activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pollotek <claudio.sant...@gmail.com>
Subject Store and Forward with embedded brokers + stand alone broker
Date Sat, 11 Aug 2012 02:20:59 GMT
I have this web application that currently connects to a stand alone broker
to place messages and consumer only nodes pick up and process the messages.
I want to move this to have embedded brokers on each web app and each
consumer and those embedded brokers should forward their messages to a stand
alone broker that will sit in the middle just like it does today.

producer app server -> embedded broker -> stand alone broker -> embedded
broker -> consumer app server

This will allow messages to be produced and queued up locally without
blocking and have the messages forwarded asynchronously. As I understand the
only thing to do here is to declare the embedded brokers on both app servers
and point their network connectors to the stand alone broker. Messages are
supposed to be stored in the embedded broker and if there are subscribers to
the queue on the stand alone broker side messages will be forwarded.

So I configured my embedded brokers with these parameters (this is the same
configuration on both, consumers and producers) :

        <amq:transportConnectors>
            <amq:transportConnector uri="vm://localhost?async=true" />
        </amq:transportConnectors>

        <amq:networkConnectors>
            <amq:networkConnector
name="connection_to_nob-${activemq.brokerid}"
                                 
uri="static:failover:(tcp://broker01:61616,tcp://broker02:61616)?randomize=false&amp;maxReconnectAttempts=0"/>
        </amq:networkConnectors>

The stand alone broker of course is configured to receive connections on
61616. I start up my application and make sure with JMX all consumers and
producers are connected to the same broker (Master-slave shared file system)
and everything looks ok so far. I create some messages for queues I have
consumers for declared in the consumer side only.

I point my producer and consumer app servers to connect to vm://localhost. I
never see a single message leave the embedded broker on the producers side.
I can see with JMX the stand alone broker doesn't create the queues where my
process is placing new messages. 

As I understand from what I read I don't need to specifically create the
queues to get messages forwarded to in the stand alone broker, they're
supposed to be automatically created. I don't have anything special on my
stand alone broker other than this destination Policy which I also have on
the embedded brokers:

 <destinationPolicy>
            <policyMap>
                <policyEntries>

                    <policyEntry queue=">">
                        <deadLetterStrategy>

                            <individualDeadLetterStrategy queuePrefix="DLQ."
useQueueForQueueMessages="true" />
                        </deadLetterStrategy>
                    </policyEntry>
                </policyEntries>
            </policyMap>
        </destinationPolicy>

I'm running 5.6.0 on brokers and clients with Java 1.6.0.14 on Linux,
embedded and stand alone brokers are persistent.

Any ideas of what I am missing?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Store-and-Forward-with-embedded-brokers-stand-alone-broker-tp4655028.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message