Author |
Message
|
sysmq |
Posted: Tue Sep 26, 2006 1:19 am Post subject: How to remove RFH2 Header from messages ? |
|
|
Novice
Joined: 04 Jun 2006 Posts: 22
|
I have a Java Application using JMS to write messages to queue.
At the queue I'm getting messages with RFH2 Header.
Is there a way to configure the JNDI to remove the RFH2 Header and to put messages with MQSTR format ? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 26, 2006 1:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
I'm not a Java person, but do a search on TARGCLIENT. It's the property which controls if the RFH2 is added. One of the things you'll find is this:
http://www.mqseries.net/phpBB2/viewtopic.php?t=31426&highlight=targclient
I'll leave it to your researches & better Java people than me to figure out how exactly to use it...  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sysmq |
Posted: Tue Sep 26, 2006 1:28 am Post subject: |
|
|
Novice
Joined: 04 Jun 2006 Posts: 22
|
As far as i remember changing the TARGCLIENT to MQ removes the RFH2 Header, but will it set the format to MQSTR ? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Sep 26, 2006 1:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Please see previous disclaimer re: my level of Java knowledge!
AFAIK the format of the message is set in Java by the application as it is in all other languages. If an RFH2 is added (TAGCLIENT=2??) the format of the message is changed to MQRFH2 and the original format is moved to the corresponding field in the RFH2, again as in other languages. So if you're setting MQSTR you should get MQSTR....
...one of these days I really must get to grips with Java! Still, a better Java person will be along in a minute. In the meantime, give it a try - see what you get on the queue!  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Sep 26, 2006 2:44 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sysmq wrote: |
As far as i remember changing the TARGCLIENT to MQ removes the RFH2 Header, but will it set the format to MQSTR ? |
To set the format to MQSTR you MUST use a TextMessage.
Create it using session.createTextMessage().
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|