qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: publish to multiple clients
Date Wed, 09 Apr 2008 11:44:45 GMT
Kalle Kärkkäinen wrote:
> I'm constructing the broadcast queue like this:
> 
> broadcastChannel = session.createQueue(id+"-broadcast");
> broadcaster = session.createProducer(broadcastChannel);
> 
> and sending stuff to it like this:
> 
> JMSTextMessage msg = session.createTextMessage();
> broadcaster.send(msg);

In JMS a 'Queue' is for point-to-point communication. For broadcasting 
you want to use a 'Topic'; that way the consumers on the topic will each 
see every message sent. (If you use a queue on the other hand each 
message will be consumed by only on consumer).

Mime
View raw message