camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Setting the MessageId and CorrelationId headers before sending to IBM MQ
Date Wed, 14 Sep 2016 07:31:38 GMT
The JMSMessageID cannot be set by a client, its generated by the JMS
client/broker.

And typically for the JMSCorrelationID you would use a String type.

The JMS spec do not allow using byte arrays in JMS headers.
https://docs.oracle.com/javaee/7/api/javax/jms/Message.html



On Tue, Sep 13, 2016 at 9:33 AM, sudha0025 <sudha0025@gmail.com> wrote:
> Hi,
> Thanks in advance for looking into this.
>
> I am facing a problem in sending the message to IBM MQ with headers. I have
> added MessageId and CorrelationId as headers in camel xml but they are not
> sent along with the message.
>
> Any clues pls.
>
> below is code i have used:
>
> <setHeader headerName="WMQ_MQMD_READ_ENABLED">
>                 <simple  resultType="java.lang.Boolean">true</simple>
>             </setHeader>
>              <setHeader headerName="WMQ_MQMD_WRITE_ENABLED">
>             <simple  resultType="java.lang.Boolean">true</simple>
>             </setHeader>
>
>             <setHeader headerName="JMSMessageID">
>                <simple resultType="java.lang.byte[]">7777777</simple>
>
>               </setHeader>
>               <setHeader headerName="JMSCorrelationID">
>                         <simple
> resultType="java.lang.byte[]">1234565</simple>
>                 </setHeader>
>               <to uri="wmqComponent:QueueName" />
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Setting-the-MessageId-and-CorrelationId-headers-before-sending-to-IBM-MQ-tp5787502.html
> Sent from the Camel Development mailing list archive at Nabble.com.



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

Mime
View raw message