activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From activemqny <nianlo...@yahoo.com>
Subject distributed queue question
Date Thu, 31 May 2007 00:15:22 GMT

Hi,

This may sounds simple. But I just couldn't get it work.  I have two brokers
in two JVMs, A and B (in fact, in two physical machines). A has a few
producers and B has one consumer. I create brokers and queues
programmatically. A and B are configured as network brokers.
    BrokerService broker = new BrokerService();
    broker.setUseJmx(false);
    broker.setPersistent(false);
    broker.addConnector("tcp://localhost....");
    broker.addNetworkConnector("static:(tcp://counterpart_ip...)")
    broker.start()

Both producer and consumer use url failover:(tcp://A...,tcp://B) to get
connection.
Both producer and consumer create Queue with exactly same name during
startup.

Is this how it is supposed to work? My producer in A can publish messages
fine, but my consumer in B never get the messages. Do I need to create queue
in both broker A and B, since they are logically one queue, just
distributed? If I don't do this, how do I get the reference of the remote
queue. (I am not running in a JNDI environment.)

Thanks for your help!
-- 
View this message in context: http://www.nabble.com/distributed-queue-question-tf3843817s2354.html#a10885185
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message