I am migrating from Camel 2 to Camel 3 and I'm eager to use the Endpoint DSL described here, however I'm running into an issue when migrating my endpoints.
I used to have a route writing to a RabbitMQ queue like this:
.toD("rabbitmq:$vhost?connectionFactory=#customConnectionFactory&queue=$responseQueueName&autoDelete=false&routingKey=$responseQueueName&bridgeEndpoint=true")
Which I migrated to
.toD(
rabbitmq(vhost)
.connectionFactory(connectionFactory)
.queue(responseQueueName)
.autoDelete(false)
.routingKey(responseQueueName)
.bridgeEndpoint(true)
However, when creating the endpoint, Camel also adds a hash
parameter that cannot be set to the endpoint, resulting in the following exception:
Failed to resolve endpoint: rabbitmq://MYVHOST?autoDelete=false&bridgeEndpoint=true&hash=753a744c&queue=MYQUEUENAME&routingKey=MYQUEUENAME due to: There are 1 parameters that couldn't be set on the endpoint. Check the uri if the parameters are spelt correctly and that they are properties of the endpoint. Unknown parameters=[{hash=753a744c}]
My endpoint syntax is correct, AFAIK, because I'm using an endpoint created the same way in the from
clause of my route.
.connectionFactory("#customConnectionFactory")
– BedlatoD
not accepting the hash parameter. – Raibaz