I'm seeking best practices guidance for a .NET Core app, running on an on-premises server, that checks for messages in an Azure Storage Queue. When a message is detected, an action is performed on the on-premises server. (We do not want to use Azure Hybrid Connections.)
I have 2 working prototypes but don't know if either would be considered a best practice for this scenario.
- a locally-running Azure WebJob that handles a QueueTrigger
- a locally-running app with a BackgroundService that uses a QueueClient instance to check the queue for messages
* I did consider a locally-running Azure Function, but all the documentation for the Core Tools suggests they're only for local testing and debugging.
Each of these approaches is running inside a Windows Service so they can be monitored to ensure they're running 24/7. Bearing in mind that the sole purpose of the on-premises app is to check for Azure Queue messages, do either of these 2 approaches appear to be sound? If not, can someone please advise on a best practice for this scenario?