Hopefully this is a quick one - my setup is multiple web servers running in AWS, talking to an RDS SQL Server database, and the servers are running Hangfire. I then have a Windows service running internally that is also running a Hangfire server, and pulling down and executing jobs from the RDS database. My default queue jobs can be executed by any server, but the ones that go to a specific queue right now can only be executed internally, so my Windows service looks at those queues as well as the default queue. What I’d like to do is setup a second server instance that will run in that service that would then use MSMQ, which means that I’ll need to forward or transfer jobs from one server to another, so I’m wondering what the best way to do that would be. Theoretically I supposed I’d want to dequeue directly from the SQL Server storage into the MSMQ storage, but I’m not sure if there’s a hook for accomplishing that goal. My initial experimentation was centered around a custom JobActivator that does the forwarding, but I wasn’t sure how to signal that I was finished with a particular job, or return a job that would get executed as a no-op effectively after I sent the incoming job to the other server instance.
Thanks!
Matt