Author |
Message
|
pratik_oze |
Posted: Tue Jun 22, 2004 1:18 am Post subject: channel exits |
|
|
Apprentice
Joined: 22 Jun 2004 Posts: 34
|
There are scenarios that exist which will allow a channel exit to process the message twice (channel goes in to bind state) how can we ensure that the message is not processedtwice. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jun 22, 2004 10:57 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
It's in the product descrption!! Once and ONLY once delivery.
MQ does NOT include channel exits to do what you describe. So if you don't want it, then do not write a channel exit that duplicates messages.
Regards,
Roger _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jun 22, 2004 11:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I'm a little confused, Roger.
Suppose a channel goes down while processing some messages. The messages in the current batch get rolled back onto the transmit queue.
The channel then starts up again, and pushes the messages successfully this time.
Won't an exit on this channel see the rolled back messages more than once?
I believe this is what pratik_oze is asking about. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jun 22, 2004 11:37 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Now I won't speak for IBM but here is how I understand it would work. Messages that come across the channel are under a Local Unit of Work (LUOW) until the batch is committed.
Therefore, any "duplicate" messages created via a channel exit will also be under the same LUOW. Hence, if messages in a current batch are rolled back then the other messages in the LUOW will be rolled back.
That's my 2 cents.
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jun 22, 2004 11:56 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
RogerLacroix wrote: |
Now I won't speak for IBM but here is how I understand it would work. Messages that come across the channel are under a Local Unit of Work (LUOW) until the batch is committed.
Therefore, any "duplicate" messages created via a channel exit will also be under the same LUOW. Hence, if messages in a current batch are rolled back then the other messages in the LUOW will be rolled back. |
Roger -
Again, we are not talking about creating duplicate messages in a channel exit.
We are talking about whether a channel exit will ever see the same message more than once.
For instance, suppose a channel exit is created to log the fact that a message went across the channel. It seems like, in some cases, the channel exit would log the same message more than once - because of rollbacks and retries.
But what you say fits with what I know. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mqonnet |
Posted: Tue Jun 22, 2004 12:41 pm Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
I think the easiest way to understand this would be. Channel exits is something that is provided by the QM/MQ, but it is upto the application programmer to code whatever they wish to accomplish within it. So to speak, if the same message comes up twice, it is the responsibility of the exit to determine that and not MQ. MQ would try to deliver whatever it is supposed to and MQ makes sure that it does deliver it once or does NOT deliver it at all. But if you have exits that are in between this whole process, then proper handling of such scenarios need to taken care of.
Hence, either your exit must have appropriate message handling mechanism to handle such instances where you end up processing the same physical message twice, or else just ignore it and carry on.
Just my 2 cents.
Cheers
Kumar _________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
RogerLacroix |
Posted: Tue Jun 22, 2004 1:35 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Yes, a channel exit may see the same message more than once. That is why external file logging may give funny / interesting results. If you stick with built-in MQ features / functions you will not have this problem. i.e. log to another queue.
Regards,
Roger Lacroix _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|