activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Co <...@exist.com>
Subject Re: QueueSender question
Date Thu, 14 Jun 2007 05:04:08 GMT
Create an anonymous sender by specifying a null destination in the 
createSender method and specify the actual destination in each send.

Jim Alateras wrote:
> If I create a QueueSender
>
> QueueSender pub = session.createSender(new ActiveMQQueue("queue1"));
>
> I can't seem to use it to publish to another queue.
>
> pub.send(new ActiveMQQueue("queue2"), message);
>
> when this executes i get the following exception
>
> aused by: java.lang.UnsupportedOperationException: This producer can 
> only send messages to: queue1
>
>
> Is there any way i can use a single publisher to send messages to 
> multiple queues.
>
> cheers
> </jima>
>
>
>


Mime
View raw message