|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to change message format from MQHRF2 to MQSTR in remote |
« View previous topic :: View next topic » |
Author |
Message
|
sahasudipta |
Posted: Mon Jul 23, 2018 10:42 pm Post subject: How to change message format from MQHRF2 to MQSTR in remote |
|
|
Newbie
Joined: 05 Jul 2018 Posts: 9
|
I am receiving message in remote mq in MQHRF2 format but I want to change it into MQSTR format . we are using misp to send message to remote mq .
How can i change this format? pls help
or can i change this format MQHRF2 into string in C# ? |
|
Back to top |
|
 |
Vitor |
Posted: Tue Jul 24, 2018 5:08 am Post subject: Re: How to change message format from MQHRF2 to MQSTR in rem |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sahasudipta wrote: |
How can i change this format? pls help |
What's the problem? The "string" of the message is in the message after the RFH2 header, probably already in MQSTR format (the RFH2 header will confirm this, as it contains the format of the message following it) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jul 24, 2018 2:32 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
How does MISP connect and open the MQ queue? Do you use MQ JNDI to hold the connection information? Because if you can set the "targetClient" to MQ in the MQ JNDI then problem solved.
"MQ" means deliver only the payload to the target application (the properties are stripped from the message).
Or you can do it in the code:
Code: |
inQ = session.createQueue("queue://MQWT1/TEST.Q1?targetClient=1"); |
or
Code: |
inQ.setTargetClient(WMQConstants.WMQ_CLIENT_NONJMS_MQ); |
or
Code: |
<config-property name="targetClient">MQ</config-property> |
You can try forcing the MQGET to deliver the message with Named Properties (message properties) and then just ignore them. The message MQMD.format field will be MQSTR (string) or blank if it wasn't set.
Code: |
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_PROPERTIES_IN_HANDLE + MQC.MQGMO_FAIL_IF_QUIESCING;
MQMessage msg = new MQMessage();
inQ.Get(msg, gmo); |
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jul 24, 2018 3:40 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|