Author |
Message
|
jamesyu |
Posted: Tue Jul 20, 2010 1:08 pm Post subject: JMS message to MQ message |
|
|
Acolyte
Joined: 31 Jan 2007 Posts: 70
|
Hi All,
A Web app puts a JMS message to a MQ queue that has a meesage flow retrieve messages from. In the message flow, can we directly use MQInput node to retrieve that JMS message and process it? Can the MQinput node convert the JMS message to MQ message with MQMD, RFH2 and other other headers automatically? Or do we have to use those JMS nodes to handle JMS messages?
Thanks,
James |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jul 20, 2010 1:19 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
jamesyu |
Posted: Tue Jul 20, 2010 2:09 pm Post subject: |
|
|
Acolyte
Joined: 31 Jan 2007 Posts: 70
|
I read it and still not clear. By any chance you can please just let me know Yes or No in my case? Plain laguage is appreciated.. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jul 20, 2010 11:14 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Take a look at the JMS Sample flows in Broker.
By some strange occurrence, your question will be answered. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Mut1ey |
Posted: Wed Jul 21, 2010 9:19 am Post subject: Re: JMS message to MQ message |
|
|
Acolyte
Joined: 07 Oct 2005 Posts: 74 Location: England
|
jamesyu wrote: |
Hi All,
A Web app puts a JMS message to a MQ queue that has a meesage flow retrieve messages from. In the message flow, can we directly use MQInput node to retrieve that JMS message and process it? Can the MQinput node convert the JMS message to MQ message with MQMD, RFH2 and other other headers automatically? Or do we have to use those JMS nodes to handle JMS messages?
Thanks,
James |
It depends. What is your app server? If it is WAS you can specify the target client to be MQ or JMS (i.e. the output format of the messagess) but be careful if you are setting any properties on the message.
So if you put to MQ messages, via WAS' JMS bindings, then you do not need a JMS node to process the incoming message. If you need to retain the JMS message structure then yes - use the JMS node. Alternatively if your JMS provider is not IBM, you can use TCP sockets. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Jul 21, 2010 9:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
An MQ message is an MQ message, regardless of whether it was sent by JMS or not.
A JMS message is not guaranteed to be an MQ message.
So if your JMS application is writing to an MQ Queue, the message is an MQ Message.
If your JMS application is writing to a Sonic JMS service or an Oracle AQ service or etc., then it is *not* an MQ message.
The MQInput node can read MQ messages. The JMSInput node can read JMS messages.
Mut1ey - using TCPIP in this solution space is a worst-case scenario. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Jul 21, 2010 12:06 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
If you study how the JMSMQTransform and MQJMSTransform nodes work, the diagram below shall make better sense.
Code: |
JMS Message Tree MQMD / RFH2 Message tree
+-------------+ +------------+
| | | |
| Header |------>| MQMD |
| |< >| |
+-------------+ \ / +------------+
| | \ / | |
| Properties | X | Data |
| |<-' '--+-, +------+ |
| | '----+-'-| RFH2 | |
+-------------+ Map | | | |
| | | +------+ |
| | | | User | |
| Data Buffer |<------+-->| Data | |
| | Copy | +------+ |
+-------------+ +------------+
|
Quote: |
I read it and still not clear. By any chance you can please just let me know Yes or No in my case? Plain laguage is appreciated..
|
PLAIN LANGUAGE:
Read this:
http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ac24872_.htm
Do this:
These examples show some of the solutions that you can achieve when you use the JMS Transport. Other solutions are possible; for example, the message can be passed to a Compute node or a JavaCompute node and the contents can be modified as required.
Look at the following sample for examples of the JMS nodes being used in message flows:
JMS Nodes _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
smdavies99 |
Posted: Wed Jul 21, 2010 12:43 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
lancelotlinc wrote: |
Look at the following sample for examples of the JMS nodes being used in message flows:
JMS Nodes |
As has been suggested earlier in this thread. (and probably ignored. it is just too hard)sigh. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Mut1ey |
Posted: Thu Jul 22, 2010 2:33 am Post subject: |
|
|
Acolyte
Joined: 07 Oct 2005 Posts: 74 Location: England
|
mqjeff wrote: |
An MQ message is an MQ message, regardless of whether it was sent by JMS or not.
A JMS message is not guaranteed to be an MQ message.
So if your JMS application is writing to an MQ Queue, the message is an MQ Message.
If your JMS application is writing to a Sonic JMS service or an Oracle AQ service or etc., then it is *not* an MQ message.
The MQInput node can read MQ messages. The JMSInput node can read JMS messages.
Mut1ey - using TCPIP in this solution space is a worst-case scenario. |
Merely semantics. JMS does not care about destintaions, i.e. the provider. It is an API specification. In terms of message it is a data representation. In that respect a message on MQ Q is an MQ message, however, the fact that a JMS consumer, using MQ as the provider, can view and select on that message also makes it a JMS message.
TCP/IP was, I thought the underlying mechanism for the JMSInput and JMSOutput node. Either way, these should be used for non-MQ providers. And for MQ as the provider. MQINput followed by JMSMQTransform. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jul 22, 2010 2:41 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Quote: |
TCP/IP was, I thought the underlying mechanism for the JMSInput and JMSOutput node. Either way, these should be used for non-MQ providers. And for MQ as the provider. MQINput followed by JMSMQTransform. |
The MQInput node will build a tree with the MQMD and the RFH if present...
I would only have a JMSInput node followed by the JMSMQTransform node.
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Jul 22, 2010 2:52 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
TCP/IP is also used for the underlying transport of HTTP. And MQ. And Email. And Chat, SNMP, and almost all of the other protocols out there.
Using a TCPIP node in any situation where you are not receiving raw TCPIP traffic from an app that is directly using TCPIP itself is a worst case scenario. If you are trying to use a protocol that does not have a prebuilt node to interact with it (HTTPRequest, or etc...), you are better off writing a JavaCompute node or a Custom node than trying to use the TCPIP nodes to handle the communications.
No, it is not merely semantics that JMS and MQ are different. As you said, JMS is provider neutral. Therefore, if all you have is a "JMS Message", you have no idea what the provider is, and so no way to judge whether or not you can read it using an MQInput node. If you have an MQ message, you can decide for yourself whether you want to read it as an MQ message or as a JMS message.
I do not see any specific reason to use a JMSInput node to read from the WebSphere MQ JMS Provider. Just use MQInput. It's significantly less configuration, and likely more reliable and more performant. If you need to deal with the message as a "JMS message", you can use MQJMSTransform node. |
|
Back to top |
|
 |
|