On 01/12/16 20:18, James Franco wrote:
Thanks for the reply Gordon , so another question that I had regarding the
same topic was about the hello world example and how it is functioning ? In
that example , we have a message producer and a consumer the producer sends
a message to the default topic exchange amq.topic . Now I am confused with
the example primarily because of two reasons:
1-A message is being sent to a default Topic Exchange however no queue has
been associated with it ? Dont topic exchanges have topic queues
2-What is the routing key of the message being sent ? since there is no
subject in the message isnt the routing key empty ?

This is the qpid::messaging hello world example?

Assuming so, the qpid messaging api aims to mask some of the protocol specifics. So when you create a receiver with 'amq.topic' as the source, the library - if using AMQP 0-10 - will first determine whether that source is a queue or an exchange. If it is an exchange (as it will be for amq.topic) it then creates a temporary queue on the broker and binds that to the exchange in question.

This lets you use an exchange name in the way you would use a topic in JMS, i.e. for a non-competing consumer pattern.

The binding used depends on the topic type (which the client determines by asking the broker) and the subject (or other details of the address). Since no 'subject' is specified by default in hello world, and the exchange type is a 'topic' exchange that supports wildcarding, the key used for the binding is '#' which matches anything.

To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
For additional commands, e-mail: users-h...@qpid.apache.org

Reply via email to