Can we create an infinite job/task (kind like an Azure Worker role) with Hangfire?

Hi, I would like to know if we can create an infinite job/task (kind like an Azure Worker role) with Hangfire. I would like to queue emails in an Azure Queue using an Hangfire scheduled job (every 4 hours) and then run an infinite Hangfire fire and forget job/task (when Website start) to process (dequeue) each email and send it to Amazon SES every 200 milliseconds (5 emails per second). The infinite job needs to be up all the time in order to process new queue emails.

So, performance wise is it okay to do that and then how to manage potential errors that could stop the infinite job and how to restart it if needed. In the infinite loop job should I also create new fire and forget task for each email in order have the possibility make other retry attempt for each email. My Hangfire server will be hosted in an Azure Website.

Finally, I’m doing all this because Amazon SES cannot queue emails. My Amazon AWS subscription authorizes me to send 15 emails per second.

Hope it’s clear,
Thank you,

Why do you want to use Hangfire for this? Can’t you just run the infinite job within your website process? I’d go with a simple bootstrapper class that is bound to the application lifetime and has an asynchronous while (true) loop to dequeue your emails and schedule Hangfire jobs for sending them to AWS.