Author |
Message
|
vennela |
Posted: Mon Apr 14, 2003 7:31 am Post subject: How to GET a JMS Message |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I have a JMS app (I don't have control over that app) that is putting Messages. I have to read those messages back using non-java apps. How do I read those messages back. If I do a normal GET I am getting some weird characters.
Any pointers would be appreciated.
Thanks
-------
Venny |
|
Back to top |
|
 |
meekings |
Posted: Mon Apr 14, 2003 7:43 am Post subject: |
|
|
 Voyager
Joined: 28 Jun 2001 Posts: 86 Location: UK, South West
|
A JMS app will normally put an RFH2 header at the front of the payload (though it can be configured not to). Are these the "weird characters" you're seeing? If so, you just need to jump over it to get to the payload. _________________ Brian Meekings
Information Design, Inc. |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Apr 14, 2003 10:47 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
You can also indicate that you don't want JMS to put the RFH2 header on your message in the first place. There is a TARGCLIENT property on both the Q(ueue) an T(opic). You can set it to either JMS (add the header) or MQ (leave the header off). |
|
Back to top |
|
 |
vennela |
Posted: Mon Apr 14, 2003 11:17 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Yes, I am seeing those weird characters in front of the actual message. That may not be too much of a problem. We are using Oracle MQ Adapter (Oracle product) that is putting the message. I want to know what are the various ways of setting the TARCLIENT parameter if I am not using JNDI. Because, I have very little control over the PUT application.
The parameters that I can specify to the Oracle Adapter are
1. QMGR name
2. QUEUE
3. HOSTNAME
4. CHANNEL
5. PORT
6. CCSID
I think they are not using JNDI objects but instead defining objects inline in the program.
I can GET the message using another JMS app. But I want to GET the message using a C app. Is this possible.
Thanks
-------
Venny |
|
Back to top |
|
 |
meekings |
Posted: Mon Apr 14, 2003 11:24 am Post subject: |
|
|
 Voyager
Joined: 28 Jun 2001 Posts: 86 Location: UK, South West
|
Queue tQueue = session.createQueue("whatever");
((MQQueue)tQueue).setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ);
in the sender app would do it, but you don't have control over that. So simply code into your C app to skip over the RFH2 header - see manual for location of the "length" field in the header. _________________ Brian Meekings
Information Design, Inc. |
|
Back to top |
|
 |
vennela |
Posted: Mon Apr 14, 2003 12:36 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Got that resolved.
I had to do this. In the file where Oracle MQ Adapter is reading parameters from, I changed the queue name like this
///RECEIVER.DATA.QUEUE?CCSID=37&targetClient=1
Previously it looked:
///RECEIVER.DATA.QUEUE
So, nonjndi objects parameters should be set something like above.
Thanks for the pointers.
-------
Venny |
|
Back to top |
|
 |
|