Hi See this FAQ http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html
On Wed, Oct 1, 2014 at 7:44 PM, sandp <[email protected]> wrote: > Hi, > Camel is trying to validate the option value *for correct Type *against the > value of an expression on start up. For *timeToLive* option, the JMS > endpoint fails the validation and blows up with an Exception since, the > value for option timeToLive is dynamically driven on some logic and it would > never get it on startup. Is there a way to tell Camel to ignore such > validation on endpoint? OR What is the best way to get around it? > > *ROUTE:* > .to("jms:queue:ctsCamelQueue?timeToLive=*${in.headers.messageTimeToLive}*&forceSendOriginalMessage=true") > > > *Exception* > *Caused by: org.apache.camel.TypeConversionException:* Error during type > conversion from type: java.lang.String to the required type: long with value > ${in.headers.messageTimeToLive} due java.lang.NumberFormatException: For > input string: "${in.headers.messageTimeToLive}" > at > org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:566) > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/camel-jms-2-14-0-option-validation-on-startup-from-an-expression-tp5757289.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: [email protected] Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
