git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: JMS Destinataion is setting NULL


Hi Claus,

I have tried to make it work with the example you have given(https://github.com/camel-extra/camel-extra/tree/master/components/camel-wmq).

But particularly I want to set JMSDestination value. You said it is in read only. Is there any way we can set as per our desired value?

Regards,
Bharat Gupta

-----Original Message-----
From: Gupta Bharat 
Sent: den 28 mars 2018 14:03
To: users@xxxxxxxxxxxxxxxx
Subject: RE: JMS Destinataion is setting NULL

Hello,

My setup involves ActiveMQ --> Apache Camel --> IBM MQ

SO I want the JMSDestination values set as topic name  and then putting the message on IBM MQ.

Using camel version 2.20.2.

Setting header using SetHeaders but still not able to get JMSDestination value only other JMS parameters are getting set and JMSDestination is coming out be null.

		<route id="wmqToAmqBridge">
			<from uri="activemq:topic:fma.1/0.st5.a.*" />
			<camel:setHeader headerName="JMSDestination">
				<camel:constant>topic://fma.1/0.st5.a.fla5i3</camel:constant>
			</camel:setHeader>
			<camel:setHeader headerName="JMSReplyTo">
				<camel:constant>fma/1.0/st5/a/fla5i3</camel:constant>
			</camel:setHeader>
			<camel:setHeader headerName="JMS_IBM_Format">
				<camel:constant>MQSTR</camel:constant>
			</camel:setHeader>
			<camel:setHeader headerName="JMSPriority">
				<camel:constant>1</camel:constant>
			</camel:setHeader>
			<camel:setHeader headerName="JMSType">
				<camel:constant>text</camel:constant>
			</camel:setHeader>
			
			<to
				uri="websphere:queue:LQ.SCCO3879.ST5?concurrentConsumers=1&amp;
                exchangePattern=InOnly&amp;preserveMessageQos=true&amp;
                includeSentJMSMessageID=true" />

Regards,
Bharat Gupta

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@xxxxxxxxx] 
Sent: den 22 mars 2018 11:36
To: users@xxxxxxxxxxxxxxxx
Subject: Re: JMS Destinataion is setting NULL

Hi

Generally the JMSDestination is for read-only, eg when you receive a
message you can use this property to know the queue name etc.

What do you want to do, do you want to override where Camel sends the
message to a queue/topic name you can specific in a header via
<setHeader> ?

Also what version of Camel do you use?
Also mind that IBM MQ has a bit special Java client where you need to
configure it properly to make it work, and you may need to use a
special JMSDestinationResolver to make it possible to resolve
queue/topic names from IBM MQQueueManager (or whats its called)

People have talked about this in the past here on the Camel user
forum, so you can search/google.

Also there is a IBM MQ Camel component at
https://github.com/camel-extra/camel-extra/tree/master/components/camel-wmq

(that needs a bit of love to polish it.)


On Thu, Mar 22, 2018 at 9:11 AM, Gupta Bharat <bharat.gupta@xxxxxxxxxx> wrote:
> am picking up message from ActiveMQ topic and routing the message to IBM MQ using APACHE CAMEL.
>
> I am setting various JMS properties that are getting reflected but when setting JMSDestination value it is coming as null.
>
> The change linked below causes camel-jms throws an exception when a message is received where JMSDestination is null (when used with WebSphere MQ).
>
> The message looks like this (anonymized)
> JMSMessage class: jms_text
> JMSType: null
> JMSDeliveryMode: 2
> JMSExpiration: 0
> JMSPriority: 5
> JMSMessageID: ID:c3e2d840e3d4d8d44040404040404040cfbd668a5f4f4261
> JMSTimestamp: 1445609217800
> JMSCorrelationID: null
> JMSDestination: null
> JMSReplyTo: queue://TEST/INPUT.QUEUE?targetClient=1
> JMSRedelivered: false
> JMSXAppID: ilities\RFHUtil\rfhutilc.exe
> JMSXDeliveryCount: 1
> JMSXUserID: MQXPLO
> JMS_IBM_Character_Set: IBM277
> JMS_IBM_Encoding: 785
> JMS_IBM_Format: MQSTR
> JMS_IBM_MsgType: 8
> JMS_IBM_PutApplType: 11
> JMS_IBM_PutDate: 20151023
> JMS_IBM_PutTime: 14065780
>
> how i can make share what i value i am setting is getting set here.
>
> <camel:setHeader headerName="JMSDestination">
> <camel:constant>XYZ</camel:constant>
> </camel:setHeader>
>
> Regards,
> Bharat Gupta
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03214.html on line 196
Call Stack
#TimeMemoryFunctionLocation
10.0008368664{main}( ).../msg03214.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03214.html on line 196
Call Stack
#TimeMemoryFunctionLocation
10.0008368664{main}( ).../msg03214.html:0