none
Azure ServiceBus Subscription RRS feed

  • Question

  • Hi,

    I am sending messages to ServiceBus Topic. I have created a topic with two subscription say Sub1 and Sub2. I am sending the messages to the topic through Send port(SB-Messaging).

    In the message to be sent I have a node <MessageHeader>. I have two receive ports(SB-Messaging), which polls the message from ServiceBus. I want to have subscription to messages based on this value of "MessageHeader". So that my RecLocation1 will receive only messages having MessageHeader = "ABC" and RecLocation2 will receive only message having MessageHeader = "XYZ".

    I want to know how can I have such kind of subscription. 



    Thanks, Girish R. Patil.

    Friday, October 16, 2015 6:44 AM

Answers

  • If both MessageHeader Types are placed in the same Topic, you need to make two subscriptions in the Topic

    1) MessageHeader = "ABC" (Sub1)

    2) MessageHeader = "XYZ" (Sub2)

    These subscription will act as queues to the SB-Messaging Adapter and you can then set up two individual Receive Locations 

    1)sb://<Namespace>.servicebus.windows.net/Topicname/Sub1

    2)sb://<Namespace>.servicebus.windows.net/Topicname/Sub2

    As of now subscriptions in a Service Bus topic can only be made through an API or the Service Bus Explorer, not directly from the portal.

    You could also just use 1 Receive Location to fetch all messages from a Queue instead of a Topic, and then Promote the MessageHeader (BizTalk style!)

    Morten la Cour

    Friday, October 16, 2015 8:17 AM

All replies