You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by activemqny <ni...@yahoo.com> on 2007/05/31 02:15:22 UTC

distributed queue question

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.