|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Change blank message format to get a TextMessage |
« View previous topic :: View next topic » |
Author |
Message
|
chakay2a |
Posted: Thu Aug 10, 2017 7:56 am Post subject: Change blank message format to get a TextMessage |
|
|
Newbie
Joined: 10 Aug 2017 Posts: 1
|
Hi
The java application I'm working on receives messages whose 'Format' is set to empty spaces. This seems to indicate to the mq classes to build and return a BytesMessage.
However the content of the message is text.
Would there be a setting to fix the format in the mq classes and to get a TextMessage rather than BytesMessage message implementation ?
Thanks for your help |
|
Back to top |
|
 |
RogerLacroix |
Posted: Thu Aug 10, 2017 9:15 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Well, the simplest solution is to get the sending application to put the correct value in the MQMD Format field. Or you could use IIB (Message Broker) to do it but it might be overkill. Or write a simple application to do it.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Aug 11, 2017 4:52 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Depending on what you have control over... you could also change your java JMS app to read the Bytes of the Bytes message, extract the ccsid and use new String(byte[], ccsid) to create the string. It's a little bit more complicated than that if the ccsid does not match a code page, but you get the idea...
Like Roger said, I would push for the sender to correctly set the format.  _________________ MQ & Broker admin |
|
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
|
|
|
|