No, Service Bus Topics are not dead.
I don’t think that Azure Service Bus Topics are going away any time soon. Although Azure Event Grid also leverages publish-subscribe capabilities and uses the concept of “Topics”, they are not the same.
Here is why:
- Message Exchange Patterns – Azure Event Grid uses a push-push-model where all the events are pushed directly to the Event Handlers. Azure Service Bus Topics, however, are using a pulling model where the Message Processor will actively check the topic subscription if there are any new messages available. This means that the Message Processor is capable of controlling when and how many message it wants to process and thus controls the load it will handle. With Azure Event Grid you don’t, so make sure your handlers can process this.
- Differences in velocity – Since Azure Service Bus Topics are using a pull-mechanism the Message Processor is in charge of getting new messages. The advantage here is that it has full control on the pace it is processing messages. That said, if they can’t keep up with the ingestion throughput the messages will only pile up until the size of the topic has been met. With Azure Event Grid however you are no longer in charge since they will push your messages to the Event Handlers. This means that your Event Handler needs to be capable to handle the load and provide some throttling to protect itself from crashing, Event Grid will retry the delivery anyway.
- Throughput – Azure Event Grid promises 10 million events per second, per region. This is far more than what Azure Service Bus can handle, unless you distribute it across multiple Service Bus Namespaces for which they have a soft limit of 100 per subscription, that’s not event close.
- Message & Event Sizes – Azure Service Bus supports message sizes up to 256 kb for Basic/Standard or even 1MB for Premium. While I couldn’t find an official limitation on the event size, my guess is that this will be similar to or less than Service Bus Basic given the throughput they promise. Of course, there is still the Claims Check pattern to bypass these limitations.
In summary, I think they have their own use-cases where I see Service Bus Topics more for a fan-out transactional processing, but with a smaller throughput where Azure Event Grid is more used as an eventing infrastructure that provides higher velocity for near-real-time processing.
As with every technology you need to compare both and see which one is best for your scenario.
Thanks for reading,
Subscribe to our RSS feed