where to attach the JMS options
Hello, for the JMS Component, where do I place the options[1] (those settings after the ?) -- within the from(jms:FOO.BAR?options...) of the route or within the Template.sendBody(jms:FOO.BAR?options...) or both places or does it depend on the option I'm setting? For example, to add jmsMessageType=Object, I see it could go in two places but am not sure which one is correct: ProducerTemplate template = context.createProducerTemplate(); MyObject myObj = new MyObject(); template.sendBody(jms:queue:numbersToDouble2?jmsMessageType=Object, myObj); and/or, within the route: from(jms:queue:numbersToDouble2?jmsMessageType=Object) .marshal(jaxbFormat) .to(), etc. Thanks, Glen [1] http://camel.apache.org/jms.html#JMS-Options
Re: where to attach the JMS options
Hi Glen, Glen Mazza wrote: Hello, for the JMS Component, where do I place the options[1] (those settings after the ?) -- within the from(jms:FOO.BAR?options...) of the route or within the Template.sendBody(jms:FOO.BAR?options...) or both places or does it depend on the option I'm setting? You need to place the option into these two place. As these two endpoint will create a producer and a consumer separately. For example, to add jmsMessageType=Object, I see it could go in two places but am not sure which one is correct: ProducerTemplate template = context.createProducerTemplate(); MyObject myObj = new MyObject(); template.sendBody(jms:queue:numbersToDouble2?jmsMessageType=Object, myObj); and/or, within the route: from(jms:queue:numbersToDouble2?jmsMessageType=Object) .marshal(jaxbFormat) .to(), etc. Thanks, Glen [1] http://camel.apache.org/jms.html#JMS-Options Willem
Re: where to attach the JMS options
Its used by the producer to indicate which JMS type to send the message as. So you need it on the producer side only. On Tue, Sep 7, 2010 at 12:41 AM, Glen Mazza glen.ma...@gmail.com wrote: Hello, for the JMS Component, where do I place the options[1] (those settings after the ?) -- within the from(jms:FOO.BAR?options...) of the route or within the Template.sendBody(jms:FOO.BAR?options...) or both places or does it depend on the option I'm setting? For example, to add jmsMessageType=Object, I see it could go in two places but am not sure which one is correct: ProducerTemplate template = context.createProducerTemplate(); MyObject myObj = new MyObject(); template.sendBody(jms:queue:numbersToDouble2?jmsMessageType=Object, myObj); and/or, within the route: from(jms:queue:numbersToDouble2?jmsMessageType=Object) .marshal(jaxbFormat) .to(), etc. Thanks, Glen [1] http://camel.apache.org/jms.html#JMS-Options -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus