ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Backout message processing

Post new topic  Reply to topic
 Backout message processing « View previous topic :: View next topic » 
Author Message
rparti
PostPosted: Tue Jun 19, 2007 6:56 am    Post subject: Backout message processing Reply with quote

Voyager

Joined: 05 Oct 2005
Posts: 86
Location: U.S.A.

Consider a queue Q1 defined with a backout threshold say 5 and a backout queue BOQ

Q1 has say 'x' messages, x>1

The first message is a poison message that will be backed out and eventually move to the backout queue when backout count reaches 5

The question is, "Will the other messages be processed at all till the first message is thrown to the backout queue"

That is....the first message is backed out and thrown back to Q1....this happens 5 times before it is thrown in BOQ. Will message 2 ever be processed till the first message is in BOQ?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jun 19, 2007 6:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

MQ is a first-in, first-out system. An MQGET always returns the first available message on the queue that matches the options specified on the GET.

Under what conditions would message #2 be returned?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 19, 2007 7:10 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
MQ is a first-in, first-out system. An MQGET always returns the first available message on the queue that matches the options specified on the GET.

Under what conditions would message #2 be returned?


If there are 2 processes reading the queue FIFO and the poison message is being processed when the 2nd process does a get?

If the queue is priority based and the 2nd message has a higher priority? Though I accept in this case the next message to arrive after the poison message is not the 2nd one in the strict sense of the queue once it's arrived.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rparti
PostPosted: Tue Jun 19, 2007 7:16 am    Post subject: Reply with quote

Voyager

Joined: 05 Oct 2005
Posts: 86
Location: U.S.A.

All the messages fit the MQGET call.

That is all the x messages can be processed with x subsequest MQGET calls.

However, consider that message 1 is storing in its payload some event that at the current moment should not be processed. It should be processed later though.

We were thinking of putting this messsage in another queue, and retry after 15 mins, by bringing back the message to Q1.

Just to understand though, if we put back the message in Q1, by backing out, will message 2 ever be processed till message 1 is thrown to BOQ
Back to top
View user's profile Send private message
rparti
PostPosted: Tue Jun 19, 2007 7:18 am    Post subject: Reply with quote

Voyager

Joined: 05 Oct 2005
Posts: 86
Location: U.S.A.

Vitor wrote:

If there are 2 processes reading the queue FIFO and the poison message is being processed when the 2nd process does a get?


Consider that there is only or process reading the queue
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jun 19, 2007 7:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There are conditions and setups in which message #2 will be returned to an MQGet before message 1 has been retried all n times, and then backed out.

It depends, among other things, on the sequence of Gets relative to the sequence of Backouts.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rparti
PostPosted: Tue Jun 19, 2007 7:20 am    Post subject: Reply with quote

Voyager

Joined: 05 Oct 2005
Posts: 86
Location: U.S.A.

So its more a matter of chance and timing
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jun 19, 2007 7:22 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

rparti wrote:
So its more a matter of chance and timing


No. It's a matter of how you have designed and implemented the application reading the messages from the queue.

MQ is always deterministic.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
rparti
PostPosted: Tue Jun 19, 2007 7:32 am    Post subject: Reply with quote

Voyager

Joined: 05 Oct 2005
Posts: 86
Location: U.S.A.

Thanks....I think its easier to continue processing Q1 in a loop, put the bad message in another queue, where it will come back to Q1 after a delay for retry.

Otherwise Q1 processing code can get very complex
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Backout message processing
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.