Regarding MQ Queue message id
Hi,
I have a file which contains the number of messages. I have extracted the fields from these messages & assigned to MQMessage object. but I am not able to assign the message id to this object. I have done something like this :
public void putQ(String fields[ ], data, MQQueue localQ) {
MQMessage msg = new MQMessage();
MQPutMessageOptions pmo = new MQPutMessageOptions();
msg.putDateTime = //assigned the date, time in Gregorian calendar format.
msg.format = //assigned the specific field
byte b [ ] = field[8].getBytes("Cp1252"); // fiels[8] contains message id in String format.
msg.messageId = b;
pmo.options = // set all context..
msg.writeString(data);
localQ.put(msg, pmo);
}
Here its assigning all the fields to MQMessage object except message id. If there are 10 messages in a file, for each message this function is called and the browser is displaying the same message 10 times instead of 10 different messages. But if i assign msg.messageId = MQC.MQMI_NONE, then it generates new message ids & displays all the messages correctly. Can someone please guide me how to assign the message ids that are extracted from a file so that i can displa all the messages with the message ids that are present in the file??