camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Quiroz <>
Subject Per message persistence and/or time to live
Date Thu, 22 May 2008 06:05:33 GMT


I have been using Camel for a while and a requirement appeared to set
certain messages as persistent while others will not. What I'd like to have
is a pipieline  of processors that end in a JMS component and the last one
can set for example headers or properties in the exchange that set the
presistent properties of the message based, e.g. on content.

I tried several ways to do this and finally manage to understand that in
order to do so you need a specific jms component where the
deliveryPersistent is set to false as follow:

	<bean id="activemq"

	<bean name="activemq-np"
		p:connectionFactory-ref="jmsFactory" p:deliveryPersistent="false"
		p:explicitQosEnabled="true" p:timeToLive="60000">

That complicates things thing it means that I have to set that all messages
from a given processor are sent to activemq-np in order for those messages
to be not persistent. What I'd expect instead is that the processor can
decide based on certain criteria if a specific message is persistent and
what time to live you can use.

I tried to set the JMSDeliveryMode and JMSExpiration headers but they are
ignored by the JMSBinding class instead delegating that decision to

What is the rationale for this decision? Wouldn't be better that each
message can be set as persistent/non persistent depending on some criteria
rather than having to tweak your routes for this?

Any ideas?

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

View raw message