activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shyam Santhanam <ssantha...@vmware.com>
Subject Problems with Virtual Topics
Date Wed, 31 Mar 2010 18:55:26 GMT

Hello ActiveMQ experts,

I'm facing some difficulty using virtual topics under a network of brokers
configuration.

Background: We have a network connector that uses a custom DiscoveryAgent to
discover other brokers in the network and setup the network connector. Every
node has a single broker.

We have one or more virtual topics e.g VirtualTopic.X, each with a consumer
queue (say Consumer.A.VirtualTopic.X), and one consumer for this queue per
network node (broker).  We send persistent messages to the VirtualTopic. We
use KahaDB as the persistence store.

The consumers use a transacted session in AUTO_ACKNOWLEDGE mode. We perform
an explicit commit/rollback depending on whether our messages were
successfully handled or some transient condition prevents them from being
handled.

This all seems to work under a single broker/node. When we test this in a
real network of brokers, we start seeing a number of problems:

1. Under some circumstances, every consumer on every node receives the same
message, even though we are consuming from a queue. The distributed queue
behaves as though it is really a set of independent queues.

2. We see messages being retained indefinitely sometimes and consumers
getting delivered already consumed, older messages on nodes when they are
restarted.

Are we missing some configuration here? Are there any conditions under which
what I just described would happen, and how do we prevent it? I've copied
our broker configuration below. The "disc" protocol in the network connector
URI pertains to our custom discovery agent.

Appreciate any insight you can provide.

Thanks,
Shyam

   <broker
        xmlns="http://activemq.apache.org/schema/core"
        id="activeMQBroker"
        brokerName="${broker.name}"
        dataDirectory="${broker.data.directory}"
        useJmx="true"
        useShutdownHook="true"
        keepDurableSubsActive="false">

        <destinationPolicy>
            <policyMap>
                <policyEntries>
                    <policyEntry queue=">" memoryLimit="5mb"/>
                    <policyEntry topic=">" memoryLimit="5mb">
                        <subscriptionRecoveryPolicy>
                            <lastImageSubscriptionRecoveryPolicy/>
                        </subscriptionRecoveryPolicy>
                    </policyEntry>
                </policyEntries>
            </policyMap>

        </destinationPolicy>

        <managementContext>
            <managementContext createConnector="false" />
        </managementContext>

        <networkConnectors>
            <networkConnector name="default-nc"
uri="disc://(tcp://${broker.name}:${jms.openwire.port})">
                <excludedDestinations>
                    <queue physicalName="Consumer.*.VirtualTopic.>" />
                </excludedDestinations>
            </networkConnector>
        </networkConnectors>

        <persistenceAdapter>
            <KahaDB
                directory="..."
                journalMaxFileLength="32mb"/>
        </persistenceAdapter>

        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="${jms.memoryUsage}" />
                </memoryUsage>

                <storeUsage>
                    <storeUsage limit="${jms.diskStoreUsage}"
name="broker.storage.${broker.name}" />
                </storeUsage>

                <tempUsage>
                    <tempUsage limit="${jms.tempUsage}" />
                </tempUsage>
            </systemUsage>
        </systemUsage>

        <transportConnectors>
            <transportConnector
                name="openwire"
                uri="tcp://${ip.primary}:${jms.openwire.port}"
               
discoveryUri="disc://(tcp://${broker.name}:${jms.openwire.port})" />
            <transportConnector
                name="stomp"
                uri="stomp://${ip.primary}:${jms.stomp.port}" />
        </transportConnectors>
    </broker>

-- 
View this message in context: http://old.nabble.com/Problems-with-Virtual-Topics-tp28100311p28100311.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message