It seems to be impossible to setup a dashboard for just monitoring.
One app producing two different types of jobs into two different queues. E.g.
IFooJob.DoFoo( ) into
BarQueue. Everything is stored in the same storage.
Two services/background workers processing jobs from separate queues. E.g.
FooService processing from
BarService processing from
BarService shouldn’t need to know about
IBarJob-interface, and should neither need an implementation for this interface.
Same goes for
FooService - it should only need knowledge about
IFooJob and provide an implementation for that.
Then we add a
DashboardApp for monitoring hangfire. It is setup with the same store as the other services.
DashboardApp need to know anything about
IBarJob? Everything that is needed should be available from the store. The activation type is stored, so it shouldn’t be impossible to just show
IFooJob.DoFoo() even though this type is unknown to the dashboard app?
And for deleting and requeuing - the dashboard app will never actually activate the implementing job type, so why should it care? It will only manipulate the storage. Set new statues for the job, or delete the job, or whatever.
I don’t want to tie my dashboard app to the actual services. I just want to see what is moving in the queues. And since this is a separate app, exposing code from the other services in a way making it easy to include in the dashboard app is both unwanted and an hassle. (especially since the dashboard app is .net core and the main services is not)