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:
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://ajitpatra.com/2020/01/15/using-service-bus-triggered-azure-durable-function-with-d365-ce/