Since today we used Camel and ActiveMQ with default JMS and a "org.apache.camel.component.jms.JmsComponent"
. When consuming a queue like "myJmsComponent:queue:myqueue"
, the "JmsDestination" header contains "myqueue".
Now we'd like to use AMQP instead, with "org.apache.camel.component.amqp.AMQPComponent"
.
When consuming the same queue with "myAmqpComponent:queue:myqueue"
the "JmsDestination" header of the message does not contains "myqueue" anymore but a dynamic system name such as "org.apache.qpid.amqp_1_0.jms.impl.QueueImpl@718762d8", and we could'nt find the queue name elsewhere.
How can we retrieve the queue name in such case ?
Seems that you are using an older version which is pulling in the now deprecated AMQP 1.0 JMS client from Qpid so I'd suggest using something more current that uses the supported Qpid JMS client.
The output you are showing seems like the code is just doing a toString on the Destination instance returned from the Message and that object doesn't implement a proper toString so you get the default. You should be using the getQueueName or getTopicName from the destination type returned (Queue or Topic).