1
votes

I am trying to use camel-activemq dependency and setting up a service that is listening to activemq queue. When i try to set the connection in the camel route exclusively, the endpoint i am using is :

"activemq:mailq?username=admin&password=password&trustAllPackages=true&concurrentConsumers=10&exchangePattern=InOnly&maxConcurrentConsumers=20&brokerURL=tcp://mail-broker-queue-pod:61616"

My problem is that the activemq dependency is defualting to the failover "localhost:61616" because it does not recoginze the brokerURL parameter.

I am trying to connect to a queue that is deployed on an openshift server. Has anyone else seen this problem?

Thanks

1

1 Answers

2
votes

brokerURL is not a parameter of the ActiveMQ component. If you would like to specify the brokerURL then you have to add the activemq component to the CamelContext like the following (source):

camelContext.addComponent("activemq", activeMQComponent("vm://localhost?broker.persistent=false"));

Example if you use Spring (source):

@Bean(name = "activemq")
public ActiveMQComponent createActiveMQComponent() {
    return ActiveMQComponent.activeMQComponent("tcp://localhost:61616"); // configure brokerURL here
}