Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on MQ

 
M Mehta
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,

I am new to MQ and need to write a program which writes something to a queue. The queue will be read by other application. I have written the code and able to post the data to the queue. However, the problem is when the data is read from the queue, the message comes out in a byte[] format. whereas the expected is to be a String.

I am writing the message using

msg.writeString() method

and putting it putting it on the queue using

queue.put(msg, new MQPutMessageOptions());

Can somebody point me how to write a message so its read as a String rather than a byte[]?

Thanks,
Me
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic