activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maxim Fateev (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AMQ-855) Add support for prefetchSize = 0
Date Wed, 09 Aug 2006 22:55:23 GMT
    [ https://issues.apache.org/activemq/browse/AMQ-855?page=comments#action_36737 ] 
            
Maxim Fateev commented on AMQ-855:
----------------------------------

I think the failure scenario (slow consumer) is very common one and should be supported by
ActiveMQ. The root cause of the problem is not the prefetch size. As James pointed out setting
it to one is good enough. But the problem is that messages are assigned to consumers as soon
as they are dispatched. If consuemer's prefetch buffer is full then they are kept in "pending"
list (see PrefetchSubscription) implementation. This list is essentially unlimited. So messages
assigned to slow consumer are never redispatched to overs unless slow consumer is disconnected
or the whole broker is bounced.

Standard way to solve this issue is to use "pull" model instead of "push". I.e. messages are
not assigned to consumers up front but given to them when requested. I understand that "push"
dispatch model of ActiveMQ is due to desire to support "selector expressions". But it doesn't
mean that product should be unusable for customers that do not use selectors at all.

> Add support for prefetchSize = 0
> --------------------------------
>
>                 Key: AMQ-855
>                 URL: https://issues.apache.org/activemq/browse/AMQ-855
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 4.0, 4.0.1, 4.0.2
>         Environment: any
>            Reporter: Vadim Pesochinskiy
>            Priority: Critical
>             Fix For: 4.2
>
>
> This feature would enable to support following test case:
> 2 servers are processing 3 submitted jobs with following processing times 10 min, 1 min,
1 min. This sequence should finish in 10 minutes as one service will pick up the 10 minutes
job, meanwhile the other one should manage the two 1 minute jobs. Since I cannot set prefetchSize=0,
one of the 1 minute jobs is sitting in prefetch buffer and the jobs are processed in 11 minutes
instead of 10.
> This is simplification of the real scenario where I have about 30 consumers submitting
jobs to 20 consumers through AMQ 4.0.1. I have following problems:
> • Messages are sitting in prefetch buffer are not available to processors, which results
in a lot of idle time.
> • Order of processing is random. For some reason Job # 20 is processed after Job # 1500.
Since senders are synchronously blocked this can result in time-outs.
> • Some requests are real-time, i.e. there is a user waiting, so the system cannot wait,
so AMQ-850 does not fix this issue.

-- 
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

       

Mime
View raw message