ASB topic shared subscription for multi instance

Sivaranjani N 0 Reputation points
2023-03-14T22:42:27.5666667+00:00

What is the difference between subscription and shared subscription in topic ?

I have a scenario where my application scale-out automatically which is subscribed to topic A .

Expectation is to receive topic message in all instances(As per application design). but currently only one instance getting message. how to create dynamic subscription ?

using camel-jms , camel-amqp

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
542 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,066 Reputation points
    2023-03-20T04:59:49.5766667+00:00

    @Sivaranjani N For service bus only one application can consume the same message from the same entity.

    if not , is there any way to create subscription dynamically without creating upfront in azure portal ?

    You can create the subscription on the fly using the REST API, or the SDK

    As per your below scenario if you want multiple applications to read the same message/event from the same entity, then you should leverage the event hub rather than service bus.

    Send (msg-1) to Topic-A 
       sub-A is created under Topic A 
    	 ---- app1-- listening to sub A- (msg-1)
    	 ---- app2 - listening to sub A- (msg-1)
    	 -----app3 - listening to sub A- (msg-1)
    	 -----app4 - listening to sub A- (msg-1)
    

    Any number of applications can read the same event and use checkpointg feature where readers mark or commit their position within a partition event sequence.