activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Pesochinsky <>
Subject Trouble with prefetch buffer.
Date Mon, 31 Jul 2006 20:23:23 GMT


I have a test case to consider. 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

•	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

What can I do to work around these problems? Any configuration changes? How
to set prefetchSize=0; should submit a JIRA for this?

Environment & Configuration
AMQ 4.0.1

<beans xmlns="">
    <!-- Allows us to use system properties as variables in this
configuration file -->
    <broker useJmx="true" deleteAllMessagesOnStartup="true"
persistent="true" >  
        <!-- Use the following to configure how ActiveMQ is exposed in JMX

            <managementContext connectorPort="1099"

                    <policyEntry topic="FIN.>">
                            <strictOrderDispatchPolicy />
                            <constantPendingMessageLimitStrategy limit="0"/>
                            <oldestMessageEvictionStrategy />

            <kahaPersistentAdaptor dir="activemq-kaha"/>
            <transportConnector name="default" uri="tcp://localhost:61616"
            <networkConnector name="default"

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message