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 <[email protected]> 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
