activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Sparg <>
Subject Consumers are being duplicated
Date Fri, 05 Feb 2010 10:50:24 GMT

Hi all,

We are using ActiveMQ 5.2.0 over the WAN. We have a remote application that
has 2 consumers listening for messages. These 2 consumers use message
selectors in order to receive different types of messages and process these
messages accordingly. At first we were using Broker-To-Broker communication
but we found that the consumers stopped receiving messages until we
restarted the remote broker. We are now running a single broker
configuration using the failover transport connection. This seems to work
well but after a day or so the consumers on the remote application start to
We are closing all the consumers in a shut down hook as well.

The broker is using the default configuration with a change in the transport
connector’ port and the broker name.
How can I ensure that duplicate consumers are not created?


    <!-- Allows us to use system properties as variables in this
configuration file -->

    <broker xmlns=""
brokerName="repserv1" dataDirectory="${activemq.base}/data">

        <!-- Destination specific policies using destination names or
wildcards -->
                    <policyEntry queue=">" memoryLimit="100mb"/>
                    <policyEntry topic=">" memoryLimit="100mb">

        <!-- Use the following to configure how ActiveMQ is exposed in JMX
            <managementContext createConnector="true"/>
        <!-- The store and forward broker networks ActiveMQ will listen to
            <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="20 mb"/>

        <!--  The maximum about of space the broker will use before slowing
down producers -->
                    <memoryUsage limit="512 mb"/>
                    <storeUsage limit="1 gb" name="foo"/>
                    <tempUsage limit="100 mb"/>

        <!-- The transport connectors ActiveMQ will listen to -->
            <transportConnector name="openwire" uri="tcp://localhost:3545"


    ** Lets deploy some Enterprise Integration Patterns inside the ActiveMQ
Message Broker
    ** For more details see
    <camelContext id="camel"

        <!-- You can use a <package> element for each root package to search
for Java routes -->

        <!-- You can use Spring XML syntax to define the routes here using
the <route> element -->
            <from uri="activemq:example.A"/>
            <to uri="activemq:example.B"/>

    <!-- An embedded servlet engine for serving up the Admin console -->
    <jetty xmlns="">
            <nioConnector port="8161"/>

            <webAppContext contextPath="/admin"
resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
            <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
            <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message