Author |
Message
|
scravr |
Posted: Tue Aug 02, 2011 8:05 am Post subject: JMS message |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
and HI to ALL,
What will be the safe and best way to findout if a msg is JMS?
On Broker V7 can I check for:
If ((InRootRef.MQMD.Format = 'MQHRF2') and LASTMOVE(MqrfhRef) and (InRootRef.MQRFH2.mcd.Msd= 'jms_text')) then
-- this is a JMS msg
else
--this is not JMS msg
end if;
Dose JMS msg must always have mcd.Msd= 'jms_text'?
Thanks,
Mos |
|
Back to top |
|
 |
scravr |
Posted: Tue Aug 02, 2011 9:02 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
One more note:
Message arrives to flow via MQInput on BLOB parser. Then passed to ESQL Compute node. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 02, 2011 10:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
There is no real concrete way to identify a "JMS" message, as the message can also be created without the RFH header.
One indication would be in the wording of the application (which is fixed for JMS), but that could be set/used by a C or java base program just as well...
So unless you have a clear way of identifying the message due to its content or specific properties, there is no way to be 100% sure... ever...
As a general rule ... why should you care?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
scravr |
Posted: Tue Aug 02, 2011 10:40 am Post subject: |
|
|
 Partisan
Joined: 03 Apr 2003 Posts: 391 Location: NY NY USA 10021
|
specific validation + processing need to be done for XML, NonXML, JMS, etc. Then building output accordingly.
Any MQRFH2 element specifies JMS? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Aug 02, 2011 10:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
scravr wrote: |
specific validation + processing need to be done for XML, NonXML, JMS, etc. Then building output accordingly.
Any MQRFH2 element specifies JMS? |
No, you could build an RFH2 outside of JMS...
The message could not have any RFH header and be created by JMS  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 02, 2011 10:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
scravr wrote: |
specific validation + processing need to be done for XML, NonXML, JMS, etc. |
At the risk of being obvious, you can send XML and non-XML via JMS. So surely you'd be better off examining the message & processing by content (or at least format)
scravr wrote: |
Any MQRFH2 element specifies JMS? |
As my most worthy associate pointed out, a JMS message doesn't have to have an RFH2 header at all. So not finding a given element in a not present RFH2 doesn't prove it's not JMS.
And how it's been sent (JMS, XMS, TCP/IP) shouldn't affect how you validate & process the payload. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 02, 2011 10:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
No.
You should *not* need "special validation + processing" for a "JMS" message.
You *might* need special validation and processing for a *business level* message type - that would be indicated by JMS properties of some kind - but if you are in any way trying to do something different with a given message just because it was sent by JMS rather than the plain MQ API, then you're doing it wrong.
If you need to identify particular messages, that happen to be sent by JMS, then you need to specifically *mark* those messages using JMS properties, and use that mark to identify the messages. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Aug 02, 2011 10:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
scravr wrote: |
specific validation + processing need to be done for XML, NonXML, JMS, etc. Then building output accordingly.
Any MQRFH2 element specifies JMS? |
No, you could build an RFH2 outside of JMS... |
Pre v7 the RFH2 was a popular place to put metadata for all applications
fjb_saper wrote: |
The message could not have any RFH header and be created by JMS  |
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|