You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Sridhar Komandur (JIRA)" <ji...@apache.org> on 2006/08/09 19:56:23 UTC

[jira] Commented: (AMQ-850) add the ability to timeout a consumer to prevent a bad, hung or unused consumer consumer from grabbing messages

    [ https://issues.apache.org/activemq/browse/AMQ-850?page=comments#action_36732 ] 
            
Sridhar Komandur commented on AMQ-850:
--------------------------------------

James/Hiram,

Here is another proposal for fixing this issue.

At a high level, we need break the coupling between the messages allocated to a consumer and the actual act of scheduling a message, using  a  central pool (from which all the consumers get their messages).

I propose that the prefetch buffer just keep track of  token count, which indicates the messages that are available to be sent to a consumer. In effect, this is used to do flow control to the consumer. We can extend this to additional policies like "high priority message tokens" etc.

When a message is actually scheduled to the consumer (whatever be the policy used for this), an actual message is obtained from the central pool and dispatched to the consumer. After this, the token count is decremented.

This proposal, as a side affect, helps in minimizing reordering of messages unnecessarily to the consumer system (comprising of a large number of consumer entities).

Thanks 
Regards
- Sridhar Komandur

> add the ability to timeout a consumer to prevent a bad, hung or unused consumer consumer from grabbing messages
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-850
>                 URL: https://issues.apache.org/activemq/browse/AMQ-850
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>            Reporter: james strachan
>             Fix For: 4.2
>
>
> If a MessageConsumer is created but not used, it still tends to get its prefetch-buffer worth of messages. If it does not process them within a specific time the consumer should either be closed, or the messages unacked and flushed from the buffer so that the consumer does not hog the messages.
> Similarly if a consumer gets a message but then locks up without processing the message we should lazily kill the consumer releasing and redelivering all its messages

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Commented: (AMQ-850) add the ability to timeout a consumer to

Posted by Komandur <sr...@komandur.com>.

Continuing my previous posting ...

Also, note that message related accounting can happen in the central pool;
for example, any dispatched messages are marked appropriately in the message
meta-data  (which consumer it was dispatched, timestamp etc). The dispatched
messages can go to the "back" of the pool or moved to another "Ack pool"
(potentially sorted by consumer specific expiry time), which can be visited
periodically(and lazily) for further cleanup/processing.

Thanks
Regards
- Sridhar Komandur
-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28AMQ-850%29-add-the-ability-to-timeout-a-prefetch-buffer-to-prevent-a-single-consumer-grabbing-messages-tf2014900.html#a5731150
Sent from the ActiveMQ - Dev forum at Nabble.com.