ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to read/write MQ headers using Monitoring events

Post new topic  Reply to topic Goto page Previous  1, 2
 How to read/write MQ headers using Monitoring events « View previous topic :: View next topic » 
Author Message
Yoel
PostPosted: Tue Aug 25, 2015 9:09 am    Post subject: Reply with quote

Novice

Joined: 03 Apr 2012
Posts: 17

mqjeff wrote:
You might need to split the BLOB at the start of your message data, and then parse the first chunk using the MQ domain and the second chunk using your proper message domain.

Obviously, all of this after you decode the message data.

You might also be able to just use an RCD node.

This is exactly my challenge.

If I just knew how to split the message from the headers,
and if I knew of an general MQ domain, life would be much easier..
Back to top
View user's profile Send private message
Yoel
PostPosted: Tue Aug 25, 2015 9:21 am    Post subject: Reply with quote

Novice

Joined: 03 Apr 2012
Posts: 17

timber wrote:
I don't think you can use CREATE...PARSE to parse a BLOB into its various header/body trees. But an MQInput node does that job really nicely. Any reason not to use an intermediate queue, and let IIB do the heavy lifting for you?

How do you suggest putting this message into a queue without providing an MQMD?

Let me note again, I am not locked to a solution in ESQL.
If life would be easier using Java / JMS or anything else, it would be just as good.

I noticed this requirement is implemented in the record and replay in the broker to do exactly this: store the message and bode in a database.
It is also implemented in rfhutil in the read from file feature.
Back to top
View user's profile Send private message
timber
PostPosted: Tue Aug 25, 2015 10:22 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

I'm quoting the original problem statement, just for reference:
Quote:
I'm trying to write from an IIB v9 monitoring event - an entire MQ message (MQ headers and body) , and read the message later in a different flow / java app to store the payload and headers in a database in a readable way.

Should I select 'All' in 'include bitstream data in payload' in the event?
If so, I must select a binary format (base64Binary or hexBinary) since the MQ headers are binary. How would I parse the bitstream in the reading flow / java app, so I can write the info into a database?

I would do it like this:
- In the emitting message flow, include all of the bitstream in the monitoring event, and encode it as base64 for compactness.
- In a receiving message message flow ( one that subscribes to the topic where the monitoring events are published ), decode the base64 string into a BLOB ( there is an ESQL function for that ), put the BLOB into OutputRoot.BLOB.BLOB, and put the result onto an intermediate queue using an MQOutput node.
- In a third and final message flow, parse the input with an MQInput node and do whatever is required to turn the headers and the body into XML.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » How to read/write MQ headers using Monitoring events
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.