Azure queue trigger vs service bus queue trigger, which one do I need?

4.2k Views Asked by At

I'm trying to understand the difference between a queue trigger and a service bus queue trigger and which one I need!

I have a asp.net mvc site that is for creating and scheduling classes, which will be represented as a row in a db table. When a class is over I want to send an email to all students asking them to rate their teacher

As far as I'm aware the best way to do this is to create a Azure function that will create and send the emails, but where I'm lost is how to trigger that function at a specific date and time?

Do I use a queue trigger or a service bus queue trigger? What's the difference between the two and which one would be the best for my scenario?

I need to be able to cancel the message in the queue if the class is canceled.

1

There are 1 best solutions below

2
On

If cancelling scheduled messages is a hard requirement, only Service Bus allows doing that, see this blog.

However, it might be more practical to just add a check whether the class was cancelled at the beginning of your Azure Function, and quit if so.

For the rest of your scenarios, the services will both fit.

Generally, Service Bus has more advanced capabilities and guarantees, but costs more money if you send lots of messages. I usually pick Storage Queues unless I need any of those more advanced features.