You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by realice <re...@gmail.com> on 2012/09/27 20:15:47 UTC
Camel MQ help needed
Hi, I've configured a jmscomponent, but when i tried to send message to the
jms endpoint, it won't even connect to the channel and doesn't give me any
kind of error. Is there something wrong with the route or is there anyway
that i can tell whether the message is sent to the channel or not? see my
config for jmscomponent and part of the route below, many thanks
<bean id="myConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="queueManager" value="QUEUEMANAGER" />
<property name="hostName" value="HOST1" />
<property name="port" value="1010" />
<property name="channel" value="QUEUECHANNEL" />
<property name="transportType" value="1"/>
</bean>
<bean id="queueConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory" ref="myConnectionFactory" />
<property name="username" value="USER" />
<property name="password" value="PASS" />
</bean>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="queueConnectionFactory"/>
</bean>
<when>
<simple>${in.header.operationName} == 'OP1'</simple>
<split>
<method bean="splitter" method="getParts"/>
<process ref="validateParts"/>
<to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE"/>
</split>
</when>
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQ help needed
Posted by realice <re...@gmail.com>.
thank you very much, I'm sure i got many more questions to come
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158p5720214.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQ help needed
Posted by Jonathan Anstey <ja...@gmail.com>.
Something like this should do the trick (of course modify with your own
URI/destination):
...
<setHeader headerName="CamelJmsDestinationName">
<constant>queue:///MY_QUEUE?targetClient=1</constant>
</setHeader>
<to uri="wmq:queue:MY_QUEUE?useMessageIDAsCorrelationID=true"/>
On 12-09-28 02:53 PM, realice wrote:
> how do i do this within spring camel route?
>
> thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158p5720212.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQ help needed
Posted by realice <re...@gmail.com>.
how do i do this within spring camel route?
thanks
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158p5720212.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQ help needed
Posted by Jonathan Anstey <ja...@gmail.com>.
Some options are listed here:
http://camel.apache.org/jms.html#JMS-SettingJMSprovideroptionsonthedestination
On 12-09-28 02:21 PM, realice wrote:
> thanks, turns out the mq queue needs a property of targetClient with a value
> of MQJMS_CLIENT_NONJMS_MQ(1), is there any way i can specify that in camel
> route? right now i have
>
> <to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE"/>
>
> do i just do
>
> <to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE?targetClient=1/>
>
> thanks again
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158p5720210.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQ help needed
Posted by realice <re...@gmail.com>.
i tried that too, that's not part of of the property for queueconnection, the
setheader worked
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158p5720220.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQ help needed
Posted by David Karlsen <da...@gmail.com>.
You can set that option directly on the ibm mq connection factory
Den 28. sep. 2012 18:52 skrev "realice" <re...@gmail.com> følgende:
> thanks, turns out the mq queue needs a property of targetClient with a
> value
> of MQJMS_CLIENT_NONJMS_MQ(1), is there any way i can specify that in camel
> route? right now i have
>
> <to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE"/>
>
> do i just do
>
> <to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE?targetClient=1/>
>
> thanks again
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158p5720210.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: Camel MQ help needed
Posted by realice <re...@gmail.com>.
thanks, turns out the mq queue needs a property of targetClient with a value
of MQJMS_CLIENT_NONJMS_MQ(1), is there any way i can specify that in camel
route? right now i have
<to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE"/>
do i just do
<to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE?targetClient=1/>
thanks again
--
View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158p5720210.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel MQ help needed
Posted by Willem jiang <wi...@gmail.com>.
You can enable the trace[1] feature to see if the message is sent to jms endpoint.
[1]http://camel.apache.org/tracer.html
--
Willem Jiang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
http://jnn.javaeye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang
Weibo: willemjiang
On Friday, September 28, 2012 at 2:15 AM, realice wrote:
> Hi, I've configured a jmscomponent, but when i tried to send message to the
> jms endpoint, it won't even connect to the channel and doesn't give me any
> kind of error. Is there something wrong with the route or is there anyway
> that i can tell whether the message is sent to the channel or not? see my
> config for jmscomponent and part of the route below, many thanks
>
> <bean id="myConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
> <property name="queueManager" value="QUEUEMANAGER" />
> <property name="hostName" value="HOST1" />
> <property name="port" value="1010" />
> <property name="channel" value="QUEUECHANNEL" />
> <property name="transportType" value="1"/>
> </bean>
>
> <bean id="queueConnectionFactory"
>
> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
> <property name="targetConnectionFactory" ref="myConnectionFactory" />
> <property name="username" value="USER" />
> <property name="password" value="PASS" />
> </bean>
>
> <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory" ref="queueConnectionFactory"/>
> </bean>
>
> <when>
> <simple>${in.header.operationName} == 'OP1'</simple>
> <split>
> <method bean="splitter" method="getParts"/>
> <process ref="validateParts"/>
> <to uri="jms:REQUEST.QUEUE?replyTo=RESPONSE.QUEUE"/>
> </split>
> </when>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-MQ-help-needed-tp5720158.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).