Noel
Noel

Reputation: 2120

Azure ServiceBus Multiple consumers

I have a Azure Servicebus with a single topic and a single subscription. I have a windows service on-premise, that subscribes to this topic and it has filters to pick up messages intended to be run against on-premises DB's. I have a Azure App Service that is subscribed to the same Topic and Subscription. It has filters that match messages that are intended to be run against our cloud services/DB's.

I am seeing inconsistencies, mainly sometimes messages that do not appear to be handled by the consumer intended. Sometimes you will see them in the queue with the delivery count incrementing, then they finally get processed.

Have I misunderstood how Topics work. Do each of these need there own subscription (as well as filters?)?

Upvotes: 0

Views: 1500

Answers (1)

Sean Feldman
Sean Feldman

Reputation: 25994

Every subscriber interested in the message should have its own subscription. Otherwise, you have competing consumers scenario, where the two consumers feed off the same subscription (queue).

Upvotes: 3

Related Questions