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 IndexIBM MQ Java / JMSChange blank message format to get a TextMessage

Post new topicReply to topic
Change blank message format to get a TextMessage View previous topic :: View next topic
Author Message
chakay2a
PostPosted: Thu Aug 10, 2017 7:56 am Post subject: Change blank message format to get a TextMessage Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Thu Aug 10, 2017 9:15 am Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3021
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
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Fri Aug 11, 2017 4:52 am Post subject: Reply with quote

Grand Poobah

Joined: 18 Nov 2003
Posts: 19433
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
View user's profile Send private message Send e-mail
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSChange blank message format to get a TextMessage
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.