Problem: I would like to display information that is occurring WITHIN a job running on the backgroundserver such as record counts (counter) for each time a message is dequeued (subscribed) or queued (published), as for instance.
Server side:
On a very high level using SignalR and Hangfire & AspNetCore 2.1
Create a SignalR Hub
It’s my understanding, that when a job is enqueued, the hub context may
be provided to job, allowing communication between the Hangfire job and the SignalR Hub
As the Hangfire job starts to consume RabbitMQ messages for instance, a counter is
incremented and a counter message is sent to the SignalR hub.
Client side:
Using Javascript, JQuery, Razor Pages etc… Subscribe to the SignalR hub (SignalR can provide the actual scripts) and render message appropriately.
My questions are? Does this sound like a lucid approach, or does such functionality
already exist in Hangfire? Would I be able to leverage the existing Dashboard in this scenario?
Also would retries or recurring jobs also be able incorporate utilize a hub context?