1
votes

We have an Azure Function which consumes messages from a Service Bus topic. This 'EntityUpdated' topic holds messages which record changes to an entity.

It's therefore essential that these messages are processed in the order they appear on the bus.

The problems we have are:

  • the function will scale, and therefore competing consumers will process some messages quicker than others
  • we don't want to remove a message from the queue if we fail to process it

What's an appropriate solution we can undertake?

1

1 Answers

2
votes

You can restrict scale out in Azure Functions, set the limit to 1 so that it does not scale. See here. Also take look here at an article where a following kind of problem is discussed by maintaining order in Service Bus. Also take a look here for a similar problem and solution, a great article.