A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Help to create MQ message in java
Joined: Mar 23, 2010
Apr 06, 2010 14:18:33
I need some example for create a message to send via MQ Websphere in
I create and send a message but I need put some kind of format because the message arrive wrong in mq. I don't know do that.
Sorry for my english.
Joined: Jan 13, 2010
Jun 07, 2010 14:27:57
I understand that your problem is with the format of the message and not sending the message to an MQ queue, you can try the following:
MQMessage mqMessage = new MQMessage(); MQPutMessageOptions pmo = new MQPutMessageOptions(); pmo.options = MQC.MQOO_SET_IDENTITY_CONTEXT; //what you need mqMessage.persistence = MQC.MQPER_PERSISTENT; //format is MQC.MQFMT mqMessage.format = MQC.MQFMT_STRING; mqMessage.expiry = MQC.MQEI_UNLIMITED; mqMessage.messageId = MQC.MQMI_NONE; mqMessage.messageType = MQC.MQMT_DATAGRAM; //what you need // put the message in MQQueue mqQueue.put(mqMessage,pmo);
if it fails, you can put your source code and review
The MQC class is deprecated in WMQ v7, but should work.
Joined: Feb 25, 2008
Apr 01, 2013 21:48:05
Yo can use
MQC constants have moved to MQConstants class, see
Integration Developer (000-607).
WAS Admin (000-377).
I agree. Here's the link:
subject: Help to create MQ message in java
Getting Started - Java MQ Connection - Please help!
Can we send a file to MQ
How to put and retrive data from MQ using Java
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014