ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexGeneral IBM MQ SupportHow to change message format from MQHRF2 to MQSTR in remote

Post new topicReply to topic
How to change message format from MQHRF2 to MQSTR in remote View previous topic :: View next topic
Author Message
sahasudipta
PostPosted: Mon Jul 23, 2018 10:42 pm Post subject: How to change message format from MQHRF2 to MQSTR in remote Reply with quote

Newbie

Joined: 05 Jul 2018
Posts: 8

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
View user's profile Send private message
Vitor
PostPosted: Tue Jul 24, 2018 5:08 am Post subject: Re: How to change message format from MQHRF2 to MQSTR in rem Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25362
Location: Ohio, 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
View user's profile Send private message
RogerLacroix
PostPosted: Tue Jul 24, 2018 2:32 pm Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3082
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
View user's profile Send private message Visit poster's website
PeterPotkay
PostPosted: Tue Jul 24, 2018 3:40 pm Post subject: Reply with quote

Jedi Council

Joined: 15 May 2001
Posts: 7476

Another option if the apps won't change but the receiver can't deal with the RFH header is to use MQ's PROPCTL attribute. Its described in plain English by Morag's in one of her blog posts.
https://community.ibm.com/community/user/imwuc/blogs/morag-hughson/2016/08/21/ibm-mq-little-gem-15-propctl
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexGeneral IBM MQ SupportHow to change message format from MQHRF2 to MQSTR in remote
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.