Hi Team,
I am reading messages from IBM MQ and using Camel JMS component. This process 
is happening successfully so far. The below route for reference:

From(mq:queue:myQueueName)
.process(myProcessor)

This application will be deployed in more than 2 environments, but the IBM 
queue connections are same. When this happens, the application will try to read 
the same payload from the IBM MQ queue.
I would like to process the message based on a header attribute and skip when 
it’s not applicable.
Refer the header text with XML payload that is currently coming as part of the 
camel body.

This will be for env1

###<UUID>#ENV1
<Orders id=1>
  <Order1>
  </Order1>
  <Order2>
  </Order2>
  <Order3>
  </Order3>
</Orders>

This will be for env2

###<UUID>#ENV2
<Orders id=2>
  <Order1>
  </Order1>
  <Order2>
  </Order2>
  <Order3>
  </Order3>
</Orders>

That mean, the transaction must not be completed when it’s not applicable and 
the payload stays in the IBM messaging queue for the application running in a 
different env.

I would like to know:

  1.  How to process such scenarios in the camel route.
  2.  Can I use camel splitter to trim the header part under the body as it’s a 
plain text format.
  3.  Is my message considered as consumed when I read the payload and does the 
above processing since the order Ids may be different per environment.
  4.  Can I customize the transaction based on this logic. Is it possible to 
configure in the route or else where ?

-Regards
Srikant Mantha


Reply via email to