IBM MQ with camel

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

IBM MQ with camel

ravi0503
Hi All,

I was trying to read message from IBM MQ queue with the help of the code
mentioned in below thread

https://camel.465427.n5.nabble.com/Can-Camel-communicate-over-IBM-MQ-sender-receiver-channels-td4429050.html


I am able to connect to IBM queue, but whenever am trying to print the
content of camel body after consuming message, it's printing the message
content along with all headers contents also in body

 JMSMessage class: jms_text
  JMSType:          null
  JMSDeliveryMode:  2
  JMSDeliveryDelay: 0
  JMSDeliveryTime:  0
  JMSExpiration:    0
  JMSPriority:      0
  JMSMessageID:     ID:414d5120546573744d616e6167657220835e135e233d3c02
  JMSTimestamp:     1578407050630
  JMSCorrelationID: null
  JMSDestination:   null
  JMSReplyTo:       null
  JMSRedelivered:   false
    JMSXAppID: \IBM\MQ\bin64\MQExplorer.exe
    JMSXDeliveryCount: 1
    JMSXUserID: Test
    JMS_IBM_Character_Set: UTF-8
    JMS_IBM_Encoding: 546
    JMS_IBM_Format: MQSTR
    JMS_IBM_MsgType: 8
    JMS_IBM_PutApplType: 11
    JMS_IBM_PutDate: 20200107
    JMS_IBM_PutTime: 14241063
Test Message

In fact the body content should print only "Test Message"

Appreciate any input on the same.

Thanks
Ravi
Reply | Threaded
Open this post in threaded view
|

Re: IBM MQ with camel

jbonofre
Hi,

just a side note: camel-wmq is a camel-extra component allowing you to
directly interact with IBM MQ (without JMS layer):

https://github.com/camel-extra/camel-extra/tree/master/components/camel-wmq/

Regards
JB

On 07/01/2020 15:25, Ravi Kumar wrote:

> Hi All,
>
> I was trying to read message from IBM MQ queue with the help of the code
> mentioned in below thread
>
> https://camel.465427.n5.nabble.com/Can-Camel-communicate-over-IBM-MQ-sender-receiver-channels-td4429050.html
>
>
> I am able to connect to IBM queue, but whenever am trying to print the
> content of camel body after consuming message, it's printing the message
> content along with all headers contents also in body
>
>  JMSMessage class: jms_text
>   JMSType:          null
>   JMSDeliveryMode:  2
>   JMSDeliveryDelay: 0
>   JMSDeliveryTime:  0
>   JMSExpiration:    0
>   JMSPriority:      0
>   JMSMessageID:     ID:414d5120546573744d616e6167657220835e135e233d3c02
>   JMSTimestamp:     1578407050630
>   JMSCorrelationID: null
>   JMSDestination:   null
>   JMSReplyTo:       null
>   JMSRedelivered:   false
>     JMSXAppID: \IBM\MQ\bin64\MQExplorer.exe
>     JMSXDeliveryCount: 1
>     JMSXUserID: Test
>     JMS_IBM_Character_Set: UTF-8
>     JMS_IBM_Encoding: 546
>     JMS_IBM_Format: MQSTR
>     JMS_IBM_MsgType: 8
>     JMS_IBM_PutApplType: 11
>     JMS_IBM_PutDate: 20200107
>     JMS_IBM_PutTime: 14241063
> Test Message
>
> In fact the body content should print only "Test Message"
>
> Appreciate any input on the same.
>
> Thanks
> Ravi
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com