Using Hangfire to send information to another application


#1

Hi, I’m using Hangfire - fire and forget method in my application for processing a stored procedure which is being called by another application. The data of this stored proc needs to be returned back to the calling application. Since all these operations happen asynchronously, is there a way that we can track the requests and return back the data using Hangfire? My problem is that if I have multiple jobs running by the hangfire worker, it’s difficult to track the completion of a particular job and relay back that data again. I know Hangfire is good for background processing jobs, but can somebody pls let me know if Hangfire can be used for such a request-response model too?
Thanks in advance!


#2

Depending on your setup you would either have to initiate a new request back to the original application, or use SignalR to report progress back to a browser. Either way, the asynchronous nature means that once the job starts, the original request continues on without any knowledge of what the job is doing. You wouldn’t need hangfire to perform any status updates, though