-
1. Re: How to disable TTL on camel-jms?
davsclaus Oct 3, 2009 2:49 AM (in response to concombremasqué)Remember to state precisely which version of Camel you are using.
-
2. Re: How to disable TTL on camel-jms?
concombremasqué Oct 3, 2009 5:14 AM (in response to davsclaus)I am using camel 1.6.1.0 (bundled with FUSE ESB 4.1.0.2).
-
3. Re: How to disable TTL on camel-jms?
davsclaus Oct 3, 2009 7:20 AM (in response to concombremasqué)timeToLive is by default set to -1 and not configured on the Spring JmsTemplate.
So it should really use the default settings that spring provides out of the box.
Which I assumes to be the J2EE default
http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html#DEFAULT_TIME_TO_LIVE
-
4. Re: How to disable TTL on camel-jms?
davsclaus Oct 3, 2009 7:30 AM (in response to davsclaus)The spring-jms .jar uses this default
private long timeToLive = Message.DEFAULT_TIME_TO_LIVE;
So we need more details on your problem, as it looks by default that TTL is unlimited.
How is your route configured and what broker do you send to?
-
5. Re: How to disable TTL on camel-jms?
concombremasqué Oct 3, 2009 7:43 AM (in response to davsclaus)I use ActiveMQ 5.3.0.3. To sum up, I use all the components provided with FUSE ESB 4.1.0.2 (Camel 1.6.1.0, CXF 2.2.2.0)
My issue is related to my post in the FUSE Message Broker subforum, thread 1261 http://fusesource.com/forums/thread.jspa?threadID=1261&tstart=0
My camel route:
<endpoint id="workflowInputEndpoint" uri="jms:queue:$" />
You said that, by default, TTL is unlimited. But if I look at the messages posted in the broker I can clearly see that the JMS expiration header is not 0 (it contains a timestamp).
Is this possible that this TTL is added because I make use of camel-cxf (and web services have time out) before posting into the queue?
Thanks
-
6. Re: How to disable TTL on camel-jms?
davsclaus Oct 4, 2009 5:47 AM (in response to concombremasqué)When using AMQ you should perfer to use the AMQ component over the generic JMS component.
See more here:
http://camel.apache.org/activemq.html
<bean id="jms" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="configuration" ref="jmsConfig"></property> </bean>
-
7. Re: How to disable TTL on camel-jms?
davsclaus Oct 4, 2009 5:55 AM (in response to davsclaus)There is this method on AMQ connection
/** * Sets whether or not timestamps on messages should be disabled or not. If * you disable them it adds a small performance boost. */ public void setDisableTimeStampsByDefault(boolean timeStampsDisableByDefault) { this.disableTimeStampsByDefault = timeStampsDisableByDefault; }
Which may by looking at the code controls whether expiration is set or not.
But now we are clearly in the domains of AMQ which the people working on AMQ is better to explain than me.
I think you can set this option on the AMQ connection factory.
-
8. Re: How to disable TTL on camel-jms?
concombremasqué Oct 4, 2009 6:40 AM (in response to davsclaus)Yeah I know about the dedicated camel AMQ component. I have given it a try but the issue remains exactly the same (it is meant to improve performance).
I will have a look at the timestamp setting.
Thanks anyway.