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 IndexGeneral IBM MQ SupportMQRFH2 Headers

Post new topicReply to topic
MQRFH2 Headers View previous topic :: View next topic
Author Message
nberger
PostPosted: Tue Jul 10, 2001 12:17 pm Post subject: Reply with quote

Newbie

Joined: 08 Jul 2001
Posts: 7

Does anyone know a good way to strip MQRFH2 headers on messages coming in from a JMS source? I'm using the C API for MQSeries v5.2 on Solaris.

I can't seem to find any good documentation of the contents/layout of these messages and when I try to print the buffer received from MQGET, all I get is "RFH".

I can get the body of the message from the buffer by searching for the first words of the message, but I'd prefer a method that does not rely on me knowing the contents of the message.

Thanks!
Back to top
View user's profile Send private message
kolban
PostPosted: Tue Jul 10, 2001 1:15 pm Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Please have a look at Chapter 16 of the Application Programming Reference ... see

ftp://ftp.software.ibm.com/software/ts/mqseries/library/books/csqzak05.pdf

Here there is a description of the MQRFH2 header. You will find that the 3rd field is called StrucLength and is the length in bytes of the MQRFH2 header including its variable parts. Following this will be your actual data.

On the other hand, with JMS, you can define the Queue in JMSAdmin as being used by an non-JMS system which will result in the absecnce of the RFH2 header in the first place.
Back to top
View user's profile Send private message
APCGR
PostPosted: Mon Oct 29, 2001 2:26 pm Post subject: Reply with quote

Newbie

Joined: 28 Oct 2001
Posts: 7

I have read Chapter 16 but the best strategy for mixed environment is unclear to me. I will have every combination of publisher and subscriber (i.e. MQI, AMI, and JMS). I would like to specify an approach to my suppliers that will be compatible for all. I don't really care if it is more work for them up front. I want to shoot for the ultimate compatibility. If I didn't have this forum and I only had the documentation to go by I would tell my suppliers using AMI and JMS that they have nothing to worry about because they will have support for both MQRFH1 and MQRFH2 by default and I would tell the suppliers using MQI to publish using both headers and subscribe expecting both headers.
Is this right? or is it better to use the JMSAdmin approach that you described earlier? If the JMSAdmin approach is used, what happens when you have both MQI subscribers and JMS subscribers?
Back to top
View user's profile Send private message
kolban
PostPosted: Mon Oct 29, 2001 4:16 pm Post subject: Reply with quote

Grand Master

Joined: 22 May 2001
Posts: 1072
Location: Fort Worth, TX, USA

Aha ... if you are using Publish and Subscribe you have no option but to have the MQRFH1 or MQRFH2 header include. It is automatically injected there by the publisher broker (MA0C or MQSI). In this caseit needs to be processed:

o JMS - automatic
o AMI - automatic
o MQI - manual
Back to top
View user's profile Send private message
duder
PostPosted: Thu Nov 21, 2002 1:59 pm Post subject: Reply with quote

Newbie

Joined: 18 Nov 2002
Posts: 7

I'm looking to do the opposite. I don't want to strip RFH2, but instead process it. I'm modifying one of the VB samples. If I specify my buffer as a String and call MQGet, I can receive the whole message, but have trouble parsing it. My MID(buffer, position) calls seem to only return a portion of the buffer instead of the rest of the buffer. How can I grab the whole message as a string?

If I try to define the buffer as MQRFH2 and use MQGetAny, I'm unable to see the NameValueData. The documentation states that NameValueData is not in the language declaration. How do I retrieve this information and my message?

Which is the correct way?

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportMQRFH2 Headers
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.