Hello Abhay Pratap Singh,
Azure Service Bus guarantees FIFO (first-in-first-out) only within sessions. If you do not use sessions, strict global FIFO is not guaranteed, because messages may be delivered concurrently to multiple function instances or across partitions.
However, there are some approaches to approximate FIFO without sessions:
- Configure your queue for only one processing instance by limiting concurrency.
- In Azure Functions, this means setting maxConcurrentCalls (Service Bus SDK) or host.json concurrency settings to 1. host.json Example for Single-Consumer: { "version": "2.0", "extensions": { "serviceBus": { "maxConcurrentCalls": 1 } } } Enabling the First-In-First-Out pattern in Microsoft Azure Service Bus Queues and Topics For true FIFO, using sessions is the recommended approach in Service Bus.
Please accept as answer and do a Thumbs-up to upvote this response if you are satisfied with the community help. Your upvote will be beneficial for the community users facing similar issues.