Hi Team,

We faced one peculiar issue while posting the messages in string format containing XML values through .NET using IBM MQ client. Please find below the code snippet used in the program.

gmqQueue = gmqQueueManager.AccessQueue(gstrQueueName, MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING);
MQPutMessageOptions queuePutMessageOptions = new MQPutMessageOptions();

gmqRequestMessage = new MQMessage();

if (kvpIndividual.Value.ToString().Length > 51200)
gmqRequestMessage.WriteString(kvpIndividual.Value.ToString().Substring(0, 51200));

gmqRequestMessage.Format = MQC.MQFMT_STRING;
glngRecordsPutToMQ = glngRecordsPutToMQ + 1;
iStatusToUpdate = (int)StatusCode.PushSuccess;
catch (Exception)
iStatusToUpdate = (int)StatusCode.PushFailed;

kvpIndividual – Key value pair – with Key and value (XML string value)
iStatusToUpdate – To update the status in database against each key value pair

MQ server settings – 100KB size, but the message we pushed is only 51 KB. There was no error thrown after pushing the messages into Queue. But when we tried to read the message from the queue we got error saying ‘There is no message in the queue’. Both subscriber and consumer are in different IP address.

But when we tried to reduce the length of the message to 51200, it is going fine. But if the message length is greater than 51200, the message is not consumed. The same is working through Java code.
Can someone help me is there any limitations in .NET when compare to Java for MQ operations. Also can someone guide if we are pushing the messages wrongly or any commands missed in the above snippet.

Thanks in advance.