|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
coa (confirmation on arrival) in Windows |
« View previous topic :: View next topic » |
Author |
Message
|
metoyokapala |
Posted: Wed Jul 14, 2010 6:31 am Post subject: coa (confirmation on arrival) in Windows |
|
|
Newbie
Joined: 07 Jul 2005 Posts: 2 Location: NYC
|
Good Day all,
I have a code from one of our developers that has COA enabled but i have issue on the Reply Queue where it gets filled and they don't get the reply queue cleaned any syntax that they need to add on their code? Sample code below.
-----
// Write the message to the queue
WriteEvent("IWSMQSeries.Write()", "Begin initializing/writing message to queue", 1, System.Diagnostics.EventLogEntryType.Information, "Application", ".");
mqQueue = mqQMgr.AccessQueue(Queue, MQC.MQOO_OUTPUT);
message = new MQMessage();
//message.WriteString(CustomMessage);
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
message.WriteBytes(CustomMessage);
message.Format = MQC.MQFMT_STRING;
message.PutApplicationType = MQC.MQAT_WINDOWS_NT;
message.Encoding = MQC.MQENC_NATIVE;
message.CharacterSet = MQC.MQCCSI_Q_MGR;
message.CorrelationId = this.GetByteArrayFromString(CorrelationId);
message.ReplyToQueueManagerName = QueueManager;
message.ReplyToQueueName = ReplyQueueName;
// Enable Message Confirm On Arrival (COA) option
if (EnableConfirmOnArrival)
{
pmo.Options |= MQC.MQRO_PASS_CORREL_ID;
////message.MessageType = MQC.MQMT_REPORT;
message.Report = MQC.MQRO_COA;
////message.Feedback = MQC.MQFB_COA;
}
mqQueue.Put(message, pmo);
MessageIdOut = message.MessageId;
WriteEvent("IWSMQSeries.Write()", "End initializing/writing message to queue", 1, System.Diagnostics.EventLogEntryType.Information, "Application", ".");
iResult = 0;
}
catch (MQException e)
{
iResult = -1;
throw e;
}
catch (Exception e)
{
iResult = -1;
throw e;
}
finally
{
// Release resources
if (mqQueue != null)
mqQueue.Close();
if (mqQMgr != null)
mqQMgr.Disconnect();
}
Appreciate the Help. |
|
Back to top |
|
 |
bruce2359 |
Posted: Wed Jul 14, 2010 6:50 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Two things here:
1) please don't use an old post
2) if COA messages are requested, they come back to the ReplyToQueue, AND the requesting app should MQGET the COAs, just as it MQGETs the Reply message(s). Your code snippet shows only the MQPUT of the request message. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Jul 14, 2010 8:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Split from this _________________ Honesty is the best policy.
Insanity is the best defence. |
|
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
|
|
|
|