| |
|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
| API PMO generates extra message in failover |
« View previous topic :: View next topic » |
| Author |
Message
|
| fgarcia |
Posted: Mon Dec 08, 2025 5:20 pm Post subject: API PMO generates extra message in failover |
|
|
Newbie
Joined: 08 Dec 2025 Posts: 2
|
Our homegrown API that does a PMO with syncpoint and mqcmit in a Multi-instance NFS MQ V9.4 environment generates an extra message during failover exercise. Any help would greatly be appreciated.
/*********************************/
/* WRITE TO MQSeries DESTINATION */
/*******************************/
if (MQ_OVERRIDE == YES) /* override MQ? */
goto WTCHECKPT; /* yes */
sz = sizeof(struct tagMQMD); /* size of MD struct */
memcpy(&md, rdBuff, sz); /* overlay current md struct */
msglen = (inData.recSize - sz); /* record size */
wtBuffPtr = &rdBuff[sz]; /* pt to actual record */
MQPUT(Hcon, Hout, &md, &pmo, msglen, wtBuffPtr, &CompCode, &Reason);
if (CompCode != MQCC_OK)
{
if (Reason == MQRC_FORMAT_ERROR)
{
LogMsg_s(1, "MQPUT - CompCode=%d Reason=%d", CompCode, Reason);
return(-1);
}
LogMsg_s(5, "MQPUT FAILED - CompCode=%d Reason=%d", CompCode, Reason);
return(-1);
}
/***********************/
/* COMMIT MQ SYNCPOINT */
/***********************/
MQCMIT(Hcon, &CompCode, &Reason);
if (CompCode != MQCC_OK)
{
/* Do we need to do anything on MQCC_WARNING - 2124 MQRC_OUTCOME_PENDING ?? */
LogMsg_s(5, "MQCMIT FAILED - CompCode=%d Reason=%d", CompCode, Reason);
return(-1);
}
WTCHECKPT:
/********************************/
/* WRITE THE CHECK POINT RECORD */
/********************************/
cpRec.recNumber = inData.recNumber;
if ((sts = WriteCheckPoint()) != 0)
return(-1);
pHdr->rdCntDMQ = inData.recNumber; /* set write count */ |
|
| Back to top |
|
 |
| hughson |
Posted: Tue Dec 09, 2025 1:37 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1976 Location: Bay of Plenty, New Zealand
|
How do you determine that you have an extra message? Do you have one more message than expected on a queue at the end of the exercise?
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
| Back to top |
|
 |
| fgarcia |
Posted: Tue Dec 09, 2025 4:58 am Post subject: API that does a PMO - Reply |
|
|
Newbie
Joined: 08 Dec 2025 Posts: 2
|
| We perform the failover with a certain amount of messages 20992 and we end up with 20993. When the failover occurs at the MQCMIT failure the message that was last to be put to the queue is replicated. |
|
| Back to top |
|
 |
| hughson |
Posted: Tue Dec 09, 2025 11:18 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1976 Location: Bay of Plenty, New Zealand
|
So when you have the MQCMIT failure do you put another message and MQCMIT again? It is not clear from your code sample that this is happening.
Also, you have a comment suggesting you get reason code MQRC_OUTCOME_PENDING. Is this the failure you are talking about?
What other resources managers are part of the Unit of Work? Again, this is not shown in your code sample.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
| Back to top |
|
 |
| bruce2359 |
Posted: Tue Dec 09, 2025 3:50 pm Post subject: Re: API that does a PMO - Reply |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9488 Location: US: west coast, almost. Otherwise, enroute.
|
| fgarcia wrote: |
| We perform the failover with a certain amount of messages 20992 and we end up with 20993. When the failover occurs at the MQCMIT failure the message that was last to be put to the queue is replicated. |
Every message put to a queue will be included in queue depth, including messages put within units-of-work - but not yet committed.
You state that the MQCMIT fails. What ReasonCode?
How do you know that the last message put to the queue was replicated? Did you browse the queue and find two identical messages? _________________ 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 |
|
 |
| hughson |
Posted: Tue Dec 09, 2025 6:49 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1976 Location: Bay of Plenty, New Zealand
|
I will add that the likelihood is that the MQRC_OUTCOME_PENDING reason code means that the MQ part of the Global UoW has been committed and it is one of the other resource managers that has not committed, given that MQ is the TM here.
Please let us know what action your application takes upon receipt of this warning reason code. Does it put another MQ message, and thus you end up with a duplicate?
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
| 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
|
|
|
|