camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ondrej_Fialka <>
Subject How to set QPID parameters (e.g. durable=true) to Camel AMQPComponent?
Date Wed, 01 Oct 2014 09:01:18 GMT
Can I ask for help, please?

I use Camel to route messages between various email, ftp and web service
endpoints. I want to add AMQP support as well. Recently I use RabbitMQ but I
want the application to handle any AMQP 0.9.1 broker. 

The problem is I did nor find any way how to set parameters like
/durable=true/ to the AMQPComponent. I know QPID can use these parameters,
but don't know how to pass them from Camel to QPID.
If I want to connect to a durable queue it fails on incompatible parameters.
This is because AMQP Component is inherited from JMSComponent and this
component does not accept the necessary parameters.

I construct the connection dynamically as Spring bean from configuration
file (this works):

String CONNECTION_STRING = "amqp://%s:%s@%s/%s?brokerlist='tcp://%s:%s'";


amqpFactoryName = "amqConnectionFactory-" + code;
		endpointPrefix = "amqp-" + code;

constructorArguments.addIndexedArgumentValue(0, connectionString,
		GenericBeanDefinition amqpComponenetBeanDefinition = new
		MutablePropertyValues values = new MutablePropertyValues();
		values.addPropertyValue("connectionFactory", new

The Camel route is defined like this:

This works well. But if the queue I want to connect to is durable, I tried: 


this fails:
/Failed to resolve endpoint:
amqp-IN://BURL:direct://  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=[{durable=true}]/

I found out why it fails, but don't know how to make it work.

Is there any way to set the paramaters to the underlying QPID component? Or
a different way to solve this? As I sad, I would like to use generic AMQP
approach, not just RabbitMQ.

Thank you, any help is appreciated.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message