|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
question about MQ message content |
« View previous topic :: View next topic » |
Author |
Message
|
adder |
Posted: Sun Feb 19, 2006 11:01 pm Post subject: question about MQ message content |
|
|
Apprentice
Joined: 06 Dec 2005 Posts: 43
|
I encounter a strange problem, my application put Message to MQ, but when I using MQ explorer to check message put by my application, data length is set correctly, but message content can not display correctly.
and if using amqsget to display message, message content is displayed as
"message <MDE >"
"message <MDE >"
but if using amqsbcg to display message, message content is correctly
**** Message ****
length - 14 bytes
00000000: 5049 4E47 2831 3131 3131 3130 2900 'PING(1111110). '
see my put code below:
msg.setFormat(MQFMT_STRING);
msg.useEmptyBuffer(this->buffer,sizeof(this->buffer));
msg.setMessageLength(strlen(buffer)+1);
msg.setReport(this->reportOpts);
msg.setMessageFlags(MQMF_LAST_MSG_IN_GROUP);
msg.setGroupId((const unsigned char*)MQGI_NONE);
if( 0!=strlen(this->reply2queue))
{
this->msg.setMessageType(MQMT_REQUEST);
this->msg.setReplyToQueueName(this->reply2queue);
}
if (0!=strlen(this->reply2queuemgr) )
{
this->msg.setMessageType(MQMT_REQUEST);
this->msg.setReplyToQueueManagerName(this->reply2queuemgr);
}
if ( ! queue.put(MQ_Operator::msg,this->pmo) )
{
/* report reason, if any */
this->reason_code=(int)queue.reasonCode();
cout<<"MQ_Putter::put message error with reason code:"<<this->reason_code<<" QueueMgr:"<<this->get_queue_mgr_name()<<" Queue:"<<this->get_queue_name()<<endl;
return this->reason_code;
} |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|