|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Unit Of Work issue inside Message chennal Exit |
« View previous topic :: View next topic » |
Author |
Message
|
sri |
Posted: Sun Jul 04, 2004 8:46 pm Post subject: Unit Of Work issue inside Message chennal Exit |
|
|
 Apprentice
Joined: 14 Mar 2004 Posts: 32 Location: Chennai - India
|
Dear All,
In our system,we have written Channel Message Exit which takes a copy of message coming on requestor
channel & putting (using MQPUT1) it into Alias Queue with sync point (i.e, keeping this transaction into MCA's Unit Of Work). we are not committing inside the Channel message exit (ie we are not using any MQBEGIN/MQCMIT/MQBACK).
In this case the message is deleverd to the actual destination queue by MCA properly and getting commited, but the copy of the message put from message exit to our queue is not getting comitted. The current depth is getting incremented but the UNCOM status is "YES", which means that the message is not commited. Find below the queue status
display qstatus(Q2.QM2)
4 : display qstatus(Q2.QM2)
AMQ8450: Display queue status details.
QUEUE(Q2.QM2) IPPROCS(0)
OPPROCS(0) CURDEPTH(1)
UNCOM(YES)
But this should not happen according to the following information specified in the WebSphere MQ Intercommunication Manual(page 630).
"An exit runs in the same thread as the MCA itself. It also runs inside the same
unit of work (UOW) as the MCA because it uses the same connection handle.
Therefore, any calls made under syncpoint are committed or backed out by the
channel at the end of the batch. For example, one channel message exit
program can send notification messages to another and these messages will
only be committed to the queue when the batch containing the original
message is committed.
Therefore, it is possible to issue syncpoint MQI calls from a channel message
exit program."
Anybody experienced with these this kind of issues.
Any comments on this are highly appreaciated.. Thanks |
|
Back to top |
|
 |
kman |
Posted: Sun Jul 04, 2004 10:11 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
You need to commit your exit |
|
Back to top |
|
 |
sri |
Posted: Sun Jul 04, 2004 10:39 pm Post subject: |
|
|
 Apprentice
Joined: 14 Mar 2004 Posts: 32 Location: Chennai - India
|
hi
I believe, We should not call any Explicit MQ transaction APIs from exit, since it is under the same UOW of MCA.
Channel exit uses the same connection handle of MCA.
I believe, there might be some other reason for the exit messages not getting commited.
regards
sri |
|
Back to top |
|
 |
sri |
Posted: Mon Jul 05, 2004 3:57 am Post subject: |
|
|
 Apprentice
Joined: 14 Mar 2004 Posts: 32 Location: Chennai - India
|
thanks to all
I got solution.
If the channel NPMSPEED = FAST or non-persistant messages, MCA will not maintain transactionality.
So, we should not set the syncpoint to non-persistant messages and channel type NPMSPEED =FAST.
The best way of setting the syncpoint is after checking the NPMSPEED and message type
pmo.Options = ((pChannelDef -> NonPersistentMsgSpeed ==
MQNPMS_NORMAL) ||
(pMQXQH -> MsgDesc.Persistence ==
MQPER_PERSISTENT))
? MQPMO_FAIL_IF_QUIESCING |
MQPMO_SYNCPOINT
: MQPMO_FAIL_IF_QUIESCING |
MQPMO_NO_SYNCPOINT; |
|
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
|
|
|
|