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>