MyMessageListener messageListener = new MyMessageListener();
QueueSession session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
TemporaryQueue queue1 = session.createTemporaryQueue();
QueueSender sender1 = session.createSender(queue1);
QueueReceiver receiver1 = session.createReceiver(queue1);
receiver1.setMessageListener(messageListener);
TemporaryQueue queue2 = session.createTemporaryQueue();
QueueSender sender2 = session.createSender(queue2);
QueueReceiver receiver2 = session.createReceiver(queue2);
receiver2.setMessageListener(messageListener);