qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalle Kärkkäinen" <kalle.karkkai...@intstream.fi>
Subject Re: Direct one-to-many
Date Fri, 03 Apr 2009 12:26:35 GMT
... Or is it so that I must make private queues, each attached to the same 
exchange?



----- Original Message ----- 
From: "Kalle Kärkkäinen" <kalle.karkkainen@intstream.fi>
To: <users@qpid.apache.org>
Sent: Friday, April 03, 2009 3:24 PM
Subject: Direct one-to-many


Hi,

I'm using M4 java and trunk cpp broker.

i'm experimenting with using direct exchange to do one to many 
communications, and I seem to get only one-to-one. It's rather random who 
get's the message.

I'm doing it like this:

session.exchangeDeclare("exchange", "direct", null, null, Option.DURABLE);

session.queueDeclare("queue", null, null, Option.AUTO_DELETE);
session.exchangeBind("queue", "exchange", "exchange.queue", null);

session.messageSubscribe("queue", "exchange", MessageAcceptMode.EXPLICIT, 
MessageAcquireMode.PRE_ACQUIRED, null, 0, null);

Is there some special dance I must do to get the one-to-many scheme going?

My messages are sent with routing key 'exchange.queue', and with one client 
on server it works ok, multiple clients, not so much.

I would very much so like to keep using amqp, as jms is not the target 
technology to learn here. I recognize that this probably work very well 
there.

--
Kalle.



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message