You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Vanshul.Chawla" <Va...@target.com> on 2015/04/10 08:09:50 UTC

Issue with setting JMS headers in load balance mode

Hello All,

We have a requirement where we need to set MQSTR  format to messages going out and CCSID as 500 and encoding as 785.

We used this code:

<setHeader headerName="JMS_IBM_Format">
                                         <simple>MQSTR</simple>
                                  </setHeader>
                                  <setHeader headerName="JMS_IBM_Encoding">
                                         <simple resultType="java.lang.Integer">785</simple>
                                  </setHeader>
                                  <setHeader headerName="JMS_IBM_Character_Set">
                                         <simple>500</simple>
                                  </setHeader>
                                  <setHeader headerName="CamelJmsDestinationName">
                                         <constant>queue:///{{itainventoryDemand.Perf.WMQ.ITAOutQueue0}}?targetClient=1</constant>
                                  </setHeader>

It works fine for one queue like this.

Now we need to do a loadbalance roundrobin to 10 such queues.

Issue is mesaages are getting round robin properly but with no headers when I set header under round robin block.
When I set it out, it takes for one queue only as its same header name.

How to set it for all 10 queues without using java code?


Thanks and Regards,

Vanshul Chawla


RE: Issue with setting JMS headers in load balance mode

Posted by "Vanshul.Chawla" <Va...@target.com>.
Wrote a resolver class and added reference to JMS component. Worked for all queues.

Thanks and Regards,

Vanshul Chawla

-----Original Message-----
From: Vanshul.Chawla [mailto:Vanshul.Chawla@target.com] 
Sent: Friday, April 10, 2015 11:40 AM
To: users@camel.apache.org
Subject: Issue with setting JMS headers in load balance mode
Importance: High

Hello All,

We have a requirement where we need to set MQSTR  format to messages going out and CCSID as 500 and encoding as 785.

We used this code:

<setHeader headerName="JMS_IBM_Format">
                                         <simple>MQSTR</simple>
                                  </setHeader>
                                  <setHeader headerName="JMS_IBM_Encoding">
                                         <simple resultType="java.lang.Integer">785</simple>
                                  </setHeader>
                                  <setHeader headerName="JMS_IBM_Character_Set">
                                         <simple>500</simple>
                                  </setHeader>
                                  <setHeader headerName="CamelJmsDestinationName">
                                         <constant>queue:///{{itainventoryDemand.Perf.WMQ.ITAOutQueue0}}?targetClient=1</constant>
                                  </setHeader>

It works fine for one queue like this.

Now we need to do a loadbalance roundrobin to 10 such queues.

Issue is mesaages are getting round robin properly but with no headers when I set header under round robin block.
When I set it out, it takes for one queue only as its same header name.

How to set it for all 10 queues without using java code?


Thanks and Regards,

Vanshul Chawla