Hello, I am using hangfire for scheduling of order processing jobs in our company, and it is successful but with some caveats I would really like to overcome.
Basically I have several separate logical services that will all need to be performed on our orders depending on what state they in (overly simplified: submitted orders will need step 1 run on them, step 1 orders will need step 2, etc)
The services are currently set up as completely independent windows services with a hangfire instance on each of them that is pointing to a unique queue using
BackgroundJobServerOptions with queues set to the queue that service should process.
The services responsible for running the jobs are developed and released independently by various developers with a shared library for the hangfire server implementation
I then have a single website that has the hangfire user interface for scheduling the jobs and doesn’t run any backend job logic itself
This works quite well, but has some hurdles I can’t seem to overcome. One is that basically the services are spamming the sql server as more services are added to automate more tasks in the business
the other is that the job web uses an interface to schedule the job, and the services have implementations for that interface, which is fine except that since the interface is needed for scheduling the jobs and all the services need to be able to schedule all the jobs (even though they only run the ones from a particular queue) I need to recompile and redeploy every service every time I make any change to any of the interfaces for a new service…
I think I have not designed this optimally but in my reading I can’t seem to find the recommended or “right” way to do this. Basically I want to be able to have someone write all the non hangfire related code for a new job and add this to be scheduled and run by hangfire without having to touch the existing jobs. Is there a better way?
Thanks for any input!