Reputation: 655
I'm using ActiveMQ Artemis version 2.6.2 and using Apache Camel to route messages.
When I connect Camel with jms-component in AMQ, for some reason in ActiveMQ Artemis the new queue is created with jms.queue.
as a prefix.
I know if I add the follow code on acceptor in broker.xml
the problem is solved. But sadly I don't have access to do that.
anycastPrefix=jms.queue.;multicastPrefix=jms.topic.
Is there a way to solve this in Java Code? I tried these steps but no success.
from("amq:QUEUE.TEST").setProperty("anycastPrefix", simple("jms.queue."))
from("amq:jms:queue:QUEUE.TEST")
Upvotes: 1
Views: 3982
Reputation: 35103
The reason that the queue is being created with the jms.queue.
prefix is almost certainly because Camel is using an Artemis 1.x client instead of a 2.x client. The 1.x client is hard-coded to use the jms.queue.
and jms.topic.
prefixes.
As you note, the simplest way to solve this issue is by configuring the prefixes on the appropriate acceptor in broker.xml
. I don't know of any way to solve this issue in Java code. I think your best bet would be just to upgrade the Artemis client implementation which Camel is using.
Upvotes: 3