|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Handling RFH in message data |
« View previous topic :: View next topic » |
Author |
Message
|
MABeatty1978 |
Posted: Thu Jul 17, 2014 6:38 am Post subject: Handling RFH in message data |
|
|
Acolyte
Joined: 17 Jul 2014 Posts: 54
|
I'm putting messages on a queue with message properties set as:
Code: |
cmho.Options = MQCMHO_VALIDATE; /* validate property name */
MQCRTMH(Hcon, /* connection handle */
&cmho, /* create message handle options */
&Hmsg, /* message handle */
&CompCode, /* MQCRTMH completion code */
&Reason); /* reason code */
if (CompCode == MQCC_OK)
{
// logger.writeLog("MQCRTMH successful.");
strcpy(name,"Checksum"); //set property name
valuelen = strlen(value); //Set length of the checksum value
//Set message properties
vs.VSPtr = name; //Pointer to the property
vs.VSOffset = 0;
vs.VSBufSize = (MQLONG)strlen(value); //Length of the property buffer (checksum value)
vs.VSLength = strlen(name); //Length of the property name
vs.VSCCSID = MQCCSI_APPL;
// Set the message properties for the handle
MQSETMP(Hcon, // connection handle
Hmsg, // message handle
&smpo, // set message property options
&vs, // property name
&pd, // property descriptor
MQTYPE_STRING, // property data type
valuelen, // value length
value, // value buffer
&CompCode, // completion code
&Reason); // reason code |
Everything works to put messages onto the queue, but I'm struggling to get the desired message back from the message. All I'm getting back on a MQGET is the data "RFH". In searching around this forum I see the issue is that its because the message header is on the message and the RFH is the beginning of the message buffer.
What is the appropriate way to get messages that include message properties? |
|
Back to top |
|
 |
PaulClarke |
Posted: Thu Jul 17, 2014 6:59 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
When you issue the MQGET do you put a message handle in the MQGMO ? Take a look at the AMQSBCG0.C sample to see a message handle being passed in. If there is not a message handle to fill in then MQ has to return the data as an RFH.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
MABeatty1978 |
Posted: Thu Jul 17, 2014 7:24 am Post subject: |
|
|
Acolyte
Joined: 17 Jul 2014 Posts: 54
|
PaulClarke wrote: |
When you issue the MQGET do you put a message handle in the MQGMO ? Take a look at the AMQSBCG0.C sample to see a message handle being passed in. If there is not a message handle to fill in then MQ has to return the data as an RFH.
Cheers,
Paul. |
AWESOME!!! That was it. Thank you! |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|