Home > Net >  Azure service bus one subscription VS multiple
Azure service bus one subscription VS multiple

Time:10-31

I am working something that utilizes the azure services & azure functions(with sb trigger), and trying to figure out if it matters to distribute the messages by creating multiple subscriptions VS Just one?

Please see the Before VS After in below chart: enter image description here

I am trying to improve the performance of entire process as there are too many messages sitting in there. There's no difference between the 3 functions in the After chart, all they do is upserting DB records. Does it even matter if I have 1 sub vs 3 sub in this flow ?

CodePudding user response:

Best Practices for performance improvements using Service Bus Messaging, can be found here: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-performance-improvements?tabs=net-standard-sdk-2

In your design it looks like writing to the database is going to be the bottleneck. So I would start with a single subscription.

CodePudding user response:

Please try the approach of Fan-in/Fan-out pattern with Azure Durable function

find the below use case for your reference.

https://madeofstrings.com/2019/01/09/scaling-azure-functions-to-make-500000-requests-to-weather-com-in-under-3-minutes/

https://ajitpatra.com/2020/01/15/using-service-bus-triggered-azure-durable-function-with-d365-ce/

  • Related