On 11/13/2011 09:42 PM, dmounessa wrote:
I have just started using the QPID C++ Broker with JAVA JMS API. When I run
the Hello.java included in the package, it sends one message and receives a
messages back.
When I run this on multiple topics, all subscribers receives messages from
all message producers. I enabled log on the Broker and it seems one message
is broadcast to all subscribers. What do I need to change the Hello.java app
so not to do this or is this the C++ Broker configuration.

Not quite sure what you mean by running this example 'on multiple topics', but the Hello.java example uses a Topic destination i.e. one backed by an AMQP exchange.

If you want each message to go to only one consumer, you want to use a Queue destination.

A simple way to do that is just to change the name in the hello.properties from amq.topic to the name of your queue (assuming the queue has already been created).

If you want the queue created on demand (not something I would recommend in general) you can use an address of the form:

  my-queue; {create: always}

rather than a simple name (replace my-queue with the name of the queue you wish to create/use).

Hope this helps.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to