Author |
Message
|
ethan_1988 |
Posted: Wed Feb 19, 2014 7:22 pm Post subject: JMS message retaining MQMD header |
|
|
Novice
Joined: 07 Feb 2014 Posts: 16
|
Hi Freinds,
I am struggling on a strange requirement. Our broker is going to communicate with mainframe having mq interface. Mainframe message works with MQMD.Format = 'MQSTR'. If we choose another MsgFormat like MQRFH2 then it fails. Now our architects dont wont to connect wmb qm with Mainframe QM using sender rcvr channel. They want to use jms message only. if i use jms and put message on the Q it goes with JMS transport header. NOT MQMD header (and msgformat is also changed to MQRFH2 obviusly itis not MQSTR anymore). Is that anyway we can put a message using JMS and we can retain MQMD header? i will appreciate any suggestion. I have tried hard to convince them to connect WMB QM so we can directly put MQ msg but they are not going to be agreed upon it.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Feb 19, 2014 10:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Read up on the targetClient attribute of the destination!
Please be also aware that in this case you will not be able to pass back and forth (to the MF) any of the message properties that are not natively supported (without RFH) by the message.
You may want to talk to your friendly MF programmers for them to change their coding style and retrieve the message properties in the handle. This would alleviate the need to remove the RFH2 header...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ethan_1988 |
Posted: Thu Feb 20, 2014 8:05 am Post subject: |
|
|
Novice
Joined: 07 Feb 2014 Posts: 16
|
@fjb_saper: Thanks alot... i got ot how to do it and it worked..
Let me explain for the guys who are looking for this kind of solution.
1. In the ConnectionFactory properties(MQ Explorer) make sure your Target client matching property under Extended tab is set to yes.
2. In the Destinations you have list of Qs. Select your Destination Q.Check the properties in the extended tab and Set target client as MQ.
Note:What ever reply to destination in JMS outnode will go in MQMD.Reply toQ. |
|
Back to top |
|
 |
zpat |
Posted: Thu Feb 20, 2014 8:12 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Options to generate standard MQSTR messages from JMS application.
1. Set the output MQ queue name URI (sometimes called destination resource) like this (rather than having just the queue name) - don't code the brackets []
queue:///[THE.MQ.QUEUE.DEFINITION]?targetClient=1
If you also want to control the message code page you can add this (819 = ascii, 1208 = utf8, 37 = US Ebcdic, 235 = uk ebcdic etc)
queue:///[THE.MQ.QUEUE.DEFINITION]?targetClient=1&CCSID=819
The MQ def can be a local or remote queue name as you wish.
You can also code it like this if you don't want to use remote queue definitions and it will directly hit the xmit queue called REMOTEQM
queue://[REMOTEQM]/[THE.REMOTE.MQ.QUEUE]?targetClient=1&CCSID=819
-------------------------- or ---------------------------
2. In the program code - set the target client on the queue object to NON JMS.
q.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
------------------- or ---------------
3. In the JNDI or properties - do the same as option 2
NB: MQJMS_CLIENT_NONJMS_MQ equates to the value 1 _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Feb 20, 2014 8:42 am Post subject: Re: JMS message retaining MQMD header |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
ethan_1988 wrote: |
Now our architects dont wont to connect wmb qm with Mainframe QM using sender rcvr channel. They want to use jms message only. |
So your architects want to build something that is more complex, more expensive, and slower.
For some perceived gain of 'future flexibility' that will never actually be realized without a rewrite of the entire system. |
|
Back to top |
|
 |
ethan_1988 |
Posted: Thu Feb 20, 2014 10:20 am Post subject: |
|
|
Novice
Joined: 07 Feb 2014 Posts: 16
|
@zpat: Thanks.
@mqjeff: I completely agree . Both end are MQ though they want to use JMS. its like to native english speaking people are forced to speak in chinese..  |
|
Back to top |
|
 |
|