Author |
Message
|
kaitlyn |
Posted: Thu Sep 01, 2005 8:02 am Post subject: How to view header info |
|
|
Apprentice
Joined: 24 Nov 2004 Posts: 25
|
I was wondering if any of the sample programs in the /usr/mqm/samp/bin directory would allow one to view the header information for messages. I have messages in my queue (5) and I would like to run a sample program to show me what it thinks is in the header. We have a Java program that is supposed to be looking for a message in the queue based on something that is supposed to be in the header, but isn't finding it. My speculation is that the header information isn't formatted correctly or something, but I am not sure how to check "just the header" information. The messages are in a JMS formatted queue. Please advise. Thanks. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Sep 01, 2005 8:08 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
if, by "the deader" you mean: MQMD, then amqsbcg prints the header...
if, by the header, you mean: 'RFH2', then use rfhutil (ih03 supportpac). _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 8:09 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
/usr/mqm/samp/bin/amqsbcg (Server connection)
/usr/mqm/samp/bin/amqsbcc (client connection)
This will dump the entire contents of the queue to stdout. This will show you the MQMD. The "JMS header" is an MQRFH2 header - which will be shown as the start of the body of the message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kaitlyn |
Posted: Thu Sep 01, 2005 8:22 am Post subject: |
|
|
Apprentice
Joined: 24 Nov 2004 Posts: 25
|
Just for clarification, I am using a JMS formatted message. I am not clear on the format piece. Would it make any difference if it was in MQRFH2 or MQSTR format in order to have the header? Also, I am a bit unclear as to what determines that it is part of the header. Is the definition just that it is the first thing in the message, or is there some "special" way that header information is displayed? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 8:41 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
amqsbcg, and all of the sample programs that I know of in /var/mqm/samp/bin, do not have special knowledge of anything other than the MQMD header.
MQ builds headers in the following way - there must always be an MQMD. The Format field of the MQMD indicates the format of the body. That format can indicate that the body is another header. So in the case of JMS messages, the Format field of the MQMD will indicate that the message contains an MQRFH2 header.
The actual header is prepended to the front of the message body.
The Format field of the first header will indicate the format of the next set of the body - either MQFMT_STRING or another header or etc.
If any of the messages in your queue indicate that the MQMD Format field is MQFMT_STRING, then they should not have an MQRFH2 header in them. If they all properly indicate that the message contains an MQRFH2, then the Format field in the MQRFH2 header itself (which is in the body!) should indicate either another header or the MQFMT_STRING or etc. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kaitlyn |
Posted: Thu Sep 01, 2005 8:59 am Post subject: |
|
|
Apprentice
Joined: 24 Nov 2004 Posts: 25
|
I have the following (the format is MQSTR):
<Type><![CDATA[]]></Type><DeliveryMode></DeliveryM
ode><Expiration></Expiration><Priority></Priority>
<MessageID><![CDATA[]]></MessageID><Timestamp>2005
0831</Timestamp><CorrelationID><![CDATA[]]></Corre
lationID><Destination><![CDATA[]]></Destination><R
eplyTo><![CDATA[]]></ReplyTo><Redelivered></Redeli
vered><MessageSubmitter type="java.lang.String"><!
[CDATA[20050243.003Document1.xml]]></MessageSubmit
ter>
...
The message body is in XML and follows (but not posted here).
To me, it looks like the format of this message (header info) in NOT correct, but I'm no expert. The Java program is looking for the part of the header that shows the file name (20050243.003Document1.xml) and it can't seem to find it. My guess is that this header is all messed up... |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 01, 2005 9:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I think you aren't posting the entire front part of the body section from amqsbcg.
But if the MQMD section does show a Format of MQSTR, then... yes. The header is all messed up.
What's the code that produces the message? Is it JMS code? Or... something else? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kaitlyn |
Posted: Thu Sep 01, 2005 9:16 am Post subject: |
|
|
Apprentice
Joined: 24 Nov 2004 Posts: 25
|
What you see is (and yes, it was all posted) what I see when using the WebSphere MQ Administrator tool conncecting on my Windows box to the AIX box where MQ lives. The message is being put there via an Ascential map (mercator). This is an edi solution that is now owned by IBM. The product (at the time is was purchased) is called DataStage TX. That's about all I can tell you about it. I think we're on the same page in that the format is incorrect with what it is putting in there as the header. Yes, it does indicate MQSTR as the format. |
|
Back to top |
|
 |
|