You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by wha <wi...@cgi.com> on 2008/02/15 22:12:52 UTC

Network of Brokers - Broker A talking to Broker B

Hi,

I'm using the latest snapshot 5.1

I'm having some problems with a really simple setup. I want broker A to send
its messages to Broker B.
Broker A has a producer and Broker B has a consumer.

Here's my config for broker A:

  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker xmlns="http://activemq.org/config/1.0" brokerName="brokerA"
dataDirectory="${activemq.base}/data" useJmx="true" advisorySupport="false">
  

    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>

       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
       <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>

    </transportConnectors>

    <!-- The store and forward broker networks ActiveMQ will listen to -->
    <networkConnectors>
      
      <networkConnector name="host1 and host2"
uri="static://(tcp://10.166.163.149:61616)" dynamicOnly="true"
networkTTL="2"/>
      
    </networkConnectors>



Here's my config for Broker B:



 <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
  
  <broker xmlns="http://activemq.org/config/1.0" brokerName="brokerB"
dataDirectory="${activemq.base}/data" useJmx="true" advisorySupport="false">
  

    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>

       <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
       <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>

    </transportConnectors>

    <!-- The store and forward broker networks ActiveMQ will listen to -->
    <networkConnectors>
      
      <networkConnector name="host1 and host2"
uri="static://(tcp://10.166.163.108:61616)" dynamicOnly="true"
networkTTL="2"/>
      
    </networkConnectors>


Is there anything else I need to considerate ?

Thanks.
-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15510192.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by Bruce Snyder <br...@gmail.com>.
On Feb 19, 2008 10:38 AM, wha <wi...@cgi.com> wrote:
>
> Well I don't know what to say, it doesn't work for me when I do
> advisorySupport="false"
>
> If you want to try it. Here's my BrokerA activemq.xml
>
>   <broker xmlns="http://activemq.org/config/1.0"
>         brokerName="brokerA"
>         dataDirectory="${activemq.base}/data"
>         useJmx="true"
>         advisorySupport="false">
>
>     <transportConnectors>
>        <transportConnector name="inFromProducer" uri="tcp://localhost:8881"
> />
>     </transportConnectors>
>
>     <networkConnectors>
>                 <networkConnector name="outToBrokerB"
> uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="3">
>                 </networkConnector>
>         </networkConnectors>
>   </broker>
>
> Here's my BrokerB, activemq.xml
>
>   <broker xmlns="http://activemq.org/config/1.0"
>         brokerName="brokerB"
>         dataDirectory="${activemq.base}/data"
>         useJmx="true"
>         advisorySupport="true">
>
>     <transportConnectors>
>        <transportConnector name="inFromBrokerA" uri="tcp://localhost:9991"
> />
>     </transportConnectors>
>
>     <networkConnectors>
>     </networkConnectors>
>   </broker>
>
>
> Here's my consumer code:
>
>         public void run()
>         {
>                 //Create a connection
>                 Connection conn = null;
>                 String user = null;
>                 String passw = null;
>                 String brokerurl = "tcp://localhost:9991";
>                 try
>                 {
>                         ActiveMQConnectionFactory connFactory = new
> ActiveMQConnectionFactory(user,passw,brokerurl);
>                         conn = connFactory.createConnection();
>                         conn.start();
>
>                         session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
>                         conn.setExceptionListener(this);
>
>                         Queue dest = session.createQueue("TEST.Q1");
>
>                         MessageConsumer msgConsumer = session.createConsumer(dest);
>
>                         msgConsumer.setMessageListener(this);
>
>                         System.out.println("Listening Q1...");
>
>                 }
>                 catch (JMSException jmse)
>                 {
>                         System.out.println("JMSException in run() : " + jmse);
>                 }
>         }
>
>         public void onException(JMSException jmse)
>         {
>                 System.out.println(jmse);
>         }
>
>         public void onMessage(Message mess)
>         {
>                 try
>                 {
>                         //Thread.sleep(5 * 1000);
>
>                         DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
>                         java.util.Date date = new java.util.Date();
>
>                         System.out.println(dateFormat.format(date) + " - Received msg: " +
> ((TextMessage)mess).getText());
>                         mess.acknowledge();
>
>                 }
>                 catch (JMSException jmse)
>                 {
>                         System.out.println("JMSException in onMessage()" + jmse);
>                 }
>         }
>
> And I didn't use any custom producer. I used the "Send To" from the Web
> Admin Queues page.
>
> When I turn the advisorySupport to "false" on BrokerB, Store and Forward
> stops working.
>
> Is this a bug ? Should I post a Jira ?

As Rob stated, a network of brokers requires that the advisory topics
be enabled, and it is enabled by default in the BrokerService object.
The only way to disable it is to do so explicitly via the
advisorySupport attribute on the broker element. In none of the
instructions I provided did I advise setting the advisorySupport
attribute to false.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Network of Brokers - Broker A talking to Broker B

Posted by ttmdev <jo...@ttmsolutions.com>.
I've opened the following JIRA against the documentation.

https://issues.apache.org/activemq/browse/AMQ-1590 

Joe
www.ttmsolutions.com
  



rajdavies wrote:
> 
> We do rely on advisories being present for networks to function  
> correctly at present I'm afraid
> 
> cheers,
> 
> Rob
> On 19 Feb 2008, at 17:38, wha wrote:
> 
>>
>> Well I don't know what to say, it doesn't work for me when I do
>> advisorySupport="false"
>>
>> If you want to try it. Here's my BrokerA activemq.xml
>>
>>  <broker xmlns="http://activemq.org/config/1.0"
>> 	brokerName="brokerA"
>> 	dataDirectory="${activemq.base}/data"
>> 	useJmx="true"
>> 	advisorySupport="false">
>>
>>    <transportConnectors>
>>       <transportConnector name="inFromProducer" uri="tcp://localhost: 
>> 8881"
>> />
>>    </transportConnectors>
>>
>>    <networkConnectors>
>> 		<networkConnector name="outToBrokerB"
>> uri="static://(tcp://localhost:9991)" dynamicOnly="true"  
>> networkTTL="3">
>> 		</networkConnector>
>> 	</networkConnectors>
>>  </broker>
>>
>> Here's my BrokerB, activemq.xml
>>
>>  <broker xmlns="http://activemq.org/config/1.0"
>> 	brokerName="brokerB"
>> 	dataDirectory="${activemq.base}/data"
>> 	useJmx="true"
>> 	advisorySupport="true">
>>
>>    <transportConnectors>
>>       <transportConnector name="inFromBrokerA" uri="tcp://localhost: 
>> 9991"
>> />
>>    </transportConnectors>
>>
>>    <networkConnectors>
>>    </networkConnectors>
>>  </broker>
>>
>>
>> Here's my consumer code:
>>
>> 	public void run()
>> 	{
>> 		//Create a connection
>> 		Connection conn = null;
>> 		String user = null;
>> 		String passw = null;
>> 		String brokerurl = "tcp://localhost:9991";
>> 		try
>> 		{
>> 			ActiveMQConnectionFactory connFactory = new
>> ActiveMQConnectionFactory(user,passw,brokerurl);
>> 			conn = connFactory.createConnection();
>> 			conn.start();
>> 			
>> 			session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
>> 			conn.setExceptionListener(this);
>> 			
>> 			Queue dest = session.createQueue("TEST.Q1");			
>> 			
>> 			MessageConsumer msgConsumer = session.createConsumer(dest);
>> 			
>> 			msgConsumer.setMessageListener(this);
>> 			
>> 			System.out.println("Listening Q1...");
>> 			
>> 		}
>> 		catch (JMSException jmse)
>> 		{
>> 			System.out.println("JMSException in run() : " + jmse);
>> 		}
>> 	}
>> 	
>> 	public void onException(JMSException jmse)
>> 	{
>> 		System.out.println(jmse);
>> 	}
>> 	
>> 	public void onMessage(Message mess)
>> 	{	
>> 		try
>> 		{
>> 			//Thread.sleep(5 * 1000);
>> 			
>> 			DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd  
>> HH:mm:ss");
>> 			java.util.Date date = new java.util.Date();
>> 			
>> 			System.out.println(dateFormat.format(date) + " - Received msg: " +
>> ((TextMessage)mess).getText());
>> 			mess.acknowledge();
>> 			
>> 		}
>> 		catch (JMSException jmse)
>> 		{
>> 			System.out.println("JMSException in onMessage()" + jmse);
>> 		}
>> 	}
>>
>> And I didn't use any custom producer. I used the "Send To" from the  
>> Web
>> Admin Queues page.
>>
>> When I turn the advisorySupport to "false" on BrokerB, Store and  
>> Forward
>> stops working.
>>
>> Is this a bug ? Should I post a Jira ?
>>
>> Thanks
>> -Willy.
>>
>>
>>
>> ttmdev wrote:
>>>
>>> The default setting for advisorySupport is 'true' and I don't think  
>>> that
>>> the forwarding of messages has any  dependencies on advisorySupport.
>>>
>>> Joe
>>> www.ttmsolutions.com
>>>
>>
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15562341.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15594116.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by Rob Davies <ra...@gmail.com>.
We do rely on advisories being present for networks to function  
correctly at present I'm afraid

cheers,

Rob
On 19 Feb 2008, at 17:38, wha wrote:

>
> Well I don't know what to say, it doesn't work for me when I do
> advisorySupport="false"
>
> If you want to try it. Here's my BrokerA activemq.xml
>
>  <broker xmlns="http://activemq.org/config/1.0"
> 	brokerName="brokerA"
> 	dataDirectory="${activemq.base}/data"
> 	useJmx="true"
> 	advisorySupport="false">
>
>    <transportConnectors>
>       <transportConnector name="inFromProducer" uri="tcp://localhost: 
> 8881"
> />
>    </transportConnectors>
>
>    <networkConnectors>
> 		<networkConnector name="outToBrokerB"
> uri="static://(tcp://localhost:9991)" dynamicOnly="true"  
> networkTTL="3">
> 		</networkConnector>
> 	</networkConnectors>
>  </broker>
>
> Here's my BrokerB, activemq.xml
>
>  <broker xmlns="http://activemq.org/config/1.0"
> 	brokerName="brokerB"
> 	dataDirectory="${activemq.base}/data"
> 	useJmx="true"
> 	advisorySupport="true">
>
>    <transportConnectors>
>       <transportConnector name="inFromBrokerA" uri="tcp://localhost: 
> 9991"
> />
>    </transportConnectors>
>
>    <networkConnectors>
>    </networkConnectors>
>  </broker>
>
>
> Here's my consumer code:
>
> 	public void run()
> 	{
> 		//Create a connection
> 		Connection conn = null;
> 		String user = null;
> 		String passw = null;
> 		String brokerurl = "tcp://localhost:9991";
> 		try
> 		{
> 			ActiveMQConnectionFactory connFactory = new
> ActiveMQConnectionFactory(user,passw,brokerurl);
> 			conn = connFactory.createConnection();
> 			conn.start();
> 			
> 			session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
> 			conn.setExceptionListener(this);
> 			
> 			Queue dest = session.createQueue("TEST.Q1");			
> 			
> 			MessageConsumer msgConsumer = session.createConsumer(dest);
> 			
> 			msgConsumer.setMessageListener(this);
> 			
> 			System.out.println("Listening Q1...");
> 			
> 		}
> 		catch (JMSException jmse)
> 		{
> 			System.out.println("JMSException in run() : " + jmse);
> 		}
> 	}
> 	
> 	public void onException(JMSException jmse)
> 	{
> 		System.out.println(jmse);
> 	}
> 	
> 	public void onMessage(Message mess)
> 	{	
> 		try
> 		{
> 			//Thread.sleep(5 * 1000);
> 			
> 			DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd  
> HH:mm:ss");
> 			java.util.Date date = new java.util.Date();
> 			
> 			System.out.println(dateFormat.format(date) + " - Received msg: " +
> ((TextMessage)mess).getText());
> 			mess.acknowledge();
> 			
> 		}
> 		catch (JMSException jmse)
> 		{
> 			System.out.println("JMSException in onMessage()" + jmse);
> 		}
> 	}
>
> And I didn't use any custom producer. I used the "Send To" from the  
> Web
> Admin Queues page.
>
> When I turn the advisorySupport to "false" on BrokerB, Store and  
> Forward
> stops working.
>
> Is this a bug ? Should I post a Jira ?
>
> Thanks
> -Willy.
>
>
>
> ttmdev wrote:
>>
>> The default setting for advisorySupport is 'true' and I don't think  
>> that
>> the forwarding of messages has any  dependencies on advisorySupport.
>>
>> Joe
>> www.ttmsolutions.com
>>
>
>
> -- 
> View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15562341.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Re: Network of Brokers - Broker A talking to Broker B

Posted by wha <wi...@cgi.com>.
Well I don't know what to say, it doesn't work for me when I do
advisorySupport="false"

If you want to try it. Here's my BrokerA activemq.xml

  <broker xmlns="http://activemq.org/config/1.0" 
	brokerName="brokerA" 
	dataDirectory="${activemq.base}/data" 
	useJmx="true" 
	advisorySupport="false">
  
    <transportConnectors>
       <transportConnector name="inFromProducer" uri="tcp://localhost:8881"
/>
    </transportConnectors>

    <networkConnectors>
		<networkConnector name="outToBrokerB"
uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="3">
		</networkConnector>
	</networkConnectors>
  </broker>

Here's my BrokerB, activemq.xml

  <broker xmlns="http://activemq.org/config/1.0" 
	brokerName="brokerB" 
	dataDirectory="${activemq.base}/data" 
	useJmx="true" 
	advisorySupport="true">
  
    <transportConnectors>
       <transportConnector name="inFromBrokerA" uri="tcp://localhost:9991"
/>
    </transportConnectors>

    <networkConnectors>      
    </networkConnectors>
  </broker>


Here's my consumer code:

	public void run()
	{
		//Create a connection
		Connection conn = null;
		String user = null;
		String passw = null;
		String brokerurl = "tcp://localhost:9991";
		try
		{
			ActiveMQConnectionFactory connFactory = new
ActiveMQConnectionFactory(user,passw,brokerurl);
			conn = connFactory.createConnection();
			conn.start();
			
			session = conn.createSession(false, Session.CLIENT_ACKNOWLEDGE);
			conn.setExceptionListener(this);
			
			Queue dest = session.createQueue("TEST.Q1");			
			
			MessageConsumer msgConsumer = session.createConsumer(dest);
			
			msgConsumer.setMessageListener(this);
			
			System.out.println("Listening Q1...");
			
		}
		catch (JMSException jmse)
		{
			System.out.println("JMSException in run() : " + jmse);
		}
	}
	
	public void onException(JMSException jmse)
	{
		System.out.println(jmse);
	}
	
	public void onMessage(Message mess)
	{	
		try
		{
			//Thread.sleep(5 * 1000);
			
			DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			java.util.Date date = new java.util.Date();
			
			System.out.println(dateFormat.format(date) + " - Received msg: " +
((TextMessage)mess).getText());
			mess.acknowledge();
			
		}
		catch (JMSException jmse)
		{
			System.out.println("JMSException in onMessage()" + jmse);
		}
	}

And I didn't use any custom producer. I used the "Send To" from the Web
Admin Queues page.

When I turn the advisorySupport to "false" on BrokerB, Store and Forward
stops working.

Is this a bug ? Should I post a Jira ?

Thanks
-Willy.



ttmdev wrote:
> 
> The default setting for advisorySupport is 'true' and I don't think that
> the forwarding of messages has any  dependencies on advisorySupport.
> 
> Joe
> www.ttmsolutions.com
> 


-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15562341.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by ttmdev <jo...@ttmsolutions.com>.
The default setting for advisorySupport is 'true' and I don't think that the
forwarding of messages has any  dependencies on advisorySupport.

Joe
www.ttmsolutions.com

 

wha wrote:
> 
> 
> 
> bsnyder wrote:
>> 
>> 
>> Disable the all transport connectors (i.e., comment them out) and
>> remove the discoverUri from the openwire connectors. I also advise
>> running the brokers on the same machine in order to rule out your
>> network. In order to do this, you'll need to change the following:
>> 
>> 1) Make sure the openwire ports for each broker are different for each
>> broker
>> 2) Make sure the managementContext connectorPorts are different for each
>> broker
>> 3) Make sure the jetty nioConnector  ports are different for each broker
>> 
>> These ports need to be unique to each broker so that you can start
>> more than one broker on a single machine.
>> 
>> Next, I'd suggest removing the dynamicOnly attribute until you get the
>> broker-to-broker communication working without it. Don't add any extra
>> options right now that you don't need beyond the networkTTL. Beyond
>> that the network connectors look OK.
>> 
>> After making these changes, you should be able to start a consumer
>> pointing to one broker. Then start the producer pointing to the other
>> broker. This is a very, very simple set up that should work without
>> problem. I have done this many times myself with both ActiveMQ 4.x and
>> 5.x.
>> 
>> Bruce
>> -- 
>> perl -e 'print
>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>> );'
>> 
>> Apache ActiveMQ - http://activemq.org/
>> Apache Camel - http://activemq.org/camel/
>> Apache ServiceMix - http://servicemix.org/
>> Apache Geronimo - http://geronimo.apache.org/
>> 
>> Blog: http://bruceblog.org/
>> 
>> 
> 
> I finally made it work. FiNaLlY!!!!
> 
> But first, let me just say that I'm not as smart as you guys, so I really
> need dumb down version.
> 
> 
> === Here's a summary of what I learned and followed by another question
> ===
> 
> My objective was simply to do this:      Producer ---> Broker A --->
> Broker B ---> Consumer
> I'm using the following snapshot:
> apache-activemq-5.1-20080214.225202-23.zip
> 
> 1) The transportConnector in the activemq.xml simply specifies the port at
> which the Broker will run on.
> 
> 2) The networkConnector simply specifies to which Broker to connect to.
> 
> 3) Here's the recipe for my Store and Forward topology (shown above): 
> -- On BrokerA define a transportConnector(tcp://localhost:8888) and a
> networkConnector to brokerB (tcp://localhost:9999) with dynamicOnly to
> true and networkTTL to 2.
> -- On BrokerB define only a transportConnector(tcp://localhost:9999) and
> importantly put the attribute advisorySupport="true" in the broker tag.
> -- The producer connects to tcp://localhost:8888. I simply use the Broker
> Web Admin to produce messages, so I don't really need a real producer...
> -- The consumer connects to tcp://localhost:9999 and listens for incoming
> messages (Hint: MessageListener, onMessage(..))
> 
> 4) You don't need to define, in the networkConnector tag, the
> dynamicallyIncludedDestinations tag or the staticallyIncludedDestination
> tag. You can find those info here: 
> http://activemq.apache.org/networks-of-brokers.html
> http://activemq.apache.org/networks-of-brokers.html 
> 
> 5) To verify if your brokers are connected, if you are running the
> standalone broker from DOS, you should see a line telling you that BrokerA
> has established communication with BrokerB.
> 
> 6) Once you have started up both brokers, start the consumer (that listens
> on BrokerB), then go to the Web Admin Queues page on BrokerA, you are
> suppose to see the Queue name, that your consumer on BrokerB listens on,
> in the list of Queues.
> 
> 7) Don't use the same broker name for both brokers.
> 
> 8) For the networkConnector uri, the uri can be something like
> uri="static://(tcp://localhost:9991)" OR
> uri="static:(tcp://localhost:9991)" (without "//" after "static") both
> worked for me.
> 
> === My Question ===
> 
> My question is about the advisorySupport. Can someone give me a dumb down
> explanation as to why it needs to be enabled on BrokerB for the Store and
> Forward feature to work ? I've already read about the advisorySupport
> documentation on activemq.apache.org but it doesn't say why it's linked to
> the store and forward feature.
> 
> Well Thank God I persisted. Now I can resume my tests.
> 
> Thanks all for trying to help me. I appreciate it a lot.
> - Willy.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15562329.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by wha <wi...@cgi.com>.


bsnyder wrote:
> 
> 
> Disable the all transport connectors (i.e., comment them out) and
> remove the discoverUri from the openwire connectors. I also advise
> running the brokers on the same machine in order to rule out your
> network. In order to do this, you'll need to change the following:
> 
> 1) Make sure the openwire ports for each broker are different for each
> broker
> 2) Make sure the managementContext connectorPorts are different for each
> broker
> 3) Make sure the jetty nioConnector  ports are different for each broker
> 
> These ports need to be unique to each broker so that you can start
> more than one broker on a single machine.
> 
> Next, I'd suggest removing the dynamicOnly attribute until you get the
> broker-to-broker communication working without it. Don't add any extra
> options right now that you don't need beyond the networkTTL. Beyond
> that the network connectors look OK.
> 
> After making these changes, you should be able to start a consumer
> pointing to one broker. Then start the producer pointing to the other
> broker. This is a very, very simple set up that should work without
> problem. I have done this many times myself with both ActiveMQ 4.x and
> 5.x.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

I finally made it work. FiNaLlY!!!!

But first, let me just say that I'm not as smart as you guys, so I really
need dumb down version.


=== Here's a summary of what I learned and followed by another question ===

My objective was simply to do this:      Producer ---> Broker A ---> Broker
B ---> Consumer
I'm using the following snapshot: apache-activemq-5.1-20080214.225202-23.zip

1) The transportConnector in the activemq.xml simply specifies the port at
which the Broker will run on.

2) The networkConnector simply specifies to which Broker to connect to.

3) Here's the recipe for my Store and Forward topology (shown above): 
-- On BrokerA define a transportConnector(tcp://localhost:8888) and a
networkConnector to brokerB (tcp://localhost:9999) with dynamicOnly to true
and networkTTL to 2.
-- On BrokerB define only a transportConnector(tcp://localhost:9999) and
importantly put the attribute advisorySupport="true" in the broker tag.
-- The producer connects to tcp://localhost:8888. I simply use the Broker
Web Admin to produce messages, so I don't really need a real producer...
-- The consumer connects to tcp://localhost:9999 and listens for incoming
messages (Hint: MessageListener, onMessage(..))

4) You don't need to define, in the networkConnector tag, the
dynamicallyIncludedDestinations tag or the staticallyIncludedDestination
tag. You can find those info here: 
http://activemq.apache.org/networks-of-brokers.html
http://activemq.apache.org/networks-of-brokers.html 

5) To verify if your brokers are connected, if you are running the
standalone broker from DOS, you should see a line telling you that BrokerA
has established communication with BrokerB.

6) Once you have started up both brokers, start the consumer (that listens
on BrokerB), then go to the Web Admin Queues page on BrokerA, you are
suppose to see the Queue name, that your consumer on BrokerB listens on, in
the list of Queues.

7) Don't use the same broker name for both brokers.

8) For the networkConnector uri, the uri can be something like
uri="static://(tcp://localhost:9991)" OR uri="static:(tcp://localhost:9991)"
(without "//" after "static") both worked for me.

=== My Question ===

My question is about the advisorySupport. Can someone give me a dumb down
explanation as to why it needs to be enabled on BrokerB for the Store and
Forward feature to work ? I've already read about the advisorySupport
documentation on activemq.apache.org but it doesn't say why it's linked to
the store and forward feature.

Well Thank God I persisted. Now I can resume my tests.

Thanks all for trying to help me. I appreciate it a lot.
- Willy.


-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15561548.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by Bruce Snyder <br...@gmail.com>.
On Feb 15, 2008 2:12 PM, wha <wi...@cgi.com> wrote:
>
> Hi,
>
> I'm using the latest snapshot 5.1
>
> I'm having some problems with a really simple setup. I want broker A to send
> its messages to Broker B.
> Broker A has a producer and Broker B has a consumer.
>
> Here's my config for broker A:
>
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>
>   <broker xmlns="http://activemq.org/config/1.0" brokerName="brokerA"
> dataDirectory="${activemq.base}/data" useJmx="true" advisorySupport="false">
>
>
>     <!-- The transport connectors ActiveMQ will listen to -->
>     <transportConnectors>
>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>        <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>
>
>     </transportConnectors>
>
>     <!-- The store and forward broker networks ActiveMQ will listen to -->
>     <networkConnectors>
>
>       <networkConnector name="host1 and host2"
> uri="static://(tcp://10.166.163.149:61616)" dynamicOnly="true"
> networkTTL="2"/>
>
>     </networkConnectors>
>
>
>
> Here's my config for Broker B:
>
>
>
>  <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>
>   <broker xmlns="http://activemq.org/config/1.0" brokerName="brokerB"
> dataDirectory="${activemq.base}/data" useJmx="true" advisorySupport="false">
>
>
>     <!-- The transport connectors ActiveMQ will listen to -->
>     <transportConnectors>
>
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>        <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>
>
>     </transportConnectors>
>
>     <!-- The store and forward broker networks ActiveMQ will listen to -->
>     <networkConnectors>
>
>       <networkConnector name="host1 and host2"
> uri="static://(tcp://10.166.163.108:61616)" dynamicOnly="true"
> networkTTL="2"/>
>
>     </networkConnectors>

Disable the all transport connectors (i.e., comment them out) and
remove the discoverUri from the openwire connectors. I also advise
running the brokers on the same machine in order to rule out your
network. In order to do this, you'll need to change the following:

1) Make sure the openwire ports for each broker are different for each broker
2) Make sure the managementContext connectorPorts are different for each broker
3) Make sure the jetty nioConnector  ports are different for each broker

These ports need to be unique to each broker so that you can start
more than one broker on a single machine.

Next, I'd suggest removing the dynamicOnly attribute until you get the
broker-to-broker communication working without it. Don't add any extra
options right now that you don't need beyond the networkTTL. Beyond
that the network connectors look OK.

After making these changes, you should be able to start a consumer
pointing to one broker. Then start the producer pointing to the other
broker. This is a very, very simple set up that should work without
problem. I have done this many times myself with both ActiveMQ 4.x and
5.x.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: Network of Brokers - Broker A talking to Broker B

Posted by Benoitx <be...@yahoo.com>.
I meant between 4.1.1 and 5.1.0...

As you can see, we've changed 2 versions at the same time... (ActiveMQ and
Mule)... never a good idea...

Benoit


Benoitx wrote:
> 
> Hi Hiram,
> 
> It seems that between 1.4.3 and 1.4.4 the exclude queues is not very
> strict...
> 
> See this post:
> 
> http://www.nabble.com/5.1.0-Network-Brokers%3A-changes-since-4.1.1--to17206477s2354.html#a17206477
> 
> Thanks for your reply
> 
> Benoit.
> 
> 
> Hiram Chirino wrote:
>> 
>> are all the brokers the same version or are you mixing them?
>> 
>> On Tue, May 13, 2008 at 6:45 AM, Benoitx <be...@yahoo.com> wrote:
>>>
>>> Has anyone found a solution to this?
>>>
>>> I've just upgraded from ActiveMQ 4.1.1 to 5.1.0 and suddenly all my
>>> network
>>> of brokers keep the messages in the local queues!  I think it is an
>>> issue
>>> related to the first broker not forwarding messages to the second
>>> broker. We
>>> have an old 4.1.1 broker part of the network and it is the only one that
>>> is
>>> able to forward to BrokerB...
>>>
>>> I have checked the documentation...
>>> http://activemq.apache.org/networks-of-brokers.html
>>>
>>> BrokerA:
>>> <networkConnectors>
>>>    <networkConnector name="objectlab-esb-client-to-esb-server-client1"
>>> uri="static://(tcp://localhost:27000)" dynamicOnly="true"
>>> conduitSubscriptions="true"
>>>  decreaseNetworkConsumerPriority="false">
>>>        <excludedDestinations>
>>>            <queue physicalName="*" />
>>>            <queue physicalName=">" />
>>>            <topic physicalName="*" />
>>>            <topic physicalName=">" />
>>>        </excludedDestinations>
>>>        <dynamicallyIncludedDestinations>
>>>            <queue physicalName="queue.client1.from" />
>>>        </dynamicallyIncludedDestinations>
>>>    </networkConnector>
>>> </networkConnectors>
>>>
>>> and BrokerB (where the consumers are)
>>> <transportConnectors>
>>>        <transportConnector uri="tcp://localhost:27000" />
>>> </transportConnectors>
>>>
>>> The messages stay in the queue "queue.client1.from" in BrokerA...
>>>
>>> If BrokerA runs activeMQ 4.1.1 it all works ok...
>>>
>>> What am I doing wrong?
>>>
>>> Thanks a lot
>>> Benoit
>>> http://www.Appendium.com
>>>
>>>
>>>
>>> wha wrote:
>>>>
>>>> Okay, I figured out some things since my last post.
>>>>
>>>> But I'm still unable to make messages pass from Broker A to Broker B.
>>>>
>>>> I have the following activemq.xml:
>>>>
>>>>   <broker brokerName="brokerA" ....
>>>>
>>>>     <transportConnectors>
>>>>        <transportConnector name="inFromProducer"
>>>> uri="tcp://localhost:8881" />
>>>>     </transportConnectors>
>>>>
>>>>     <networkConnectors>
>>>>       <networkConnector name="outToBrokerB"
>>>> uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="5"
>>>> />
>>>>     </networkConnectors>
>>>>     ....
>>>>
>>>> So, I have a producer publishing messages to brokerA and then I'm
>>>> trying
>>>> to forward those messages to broker B. BrokerB has the following
>>>> config:
>>>>
>>>> <broker brokerName="brokerB" ....
>>>>     <transportConnectors>
>>>>        <transportConnector name="inFromBrokerA"
>>>> uri="tcp://localhost:9991"
>>>> />
>>>>          <transportConnector name="inFromConsumer"
>>>> uri="tcp://localhost:9992"
>>>> />
>>>>     </transportConnectors>
>>>>     ...
>>>>
>>>> On BrokerB I have a consumer connected to port:9992 and no
>>>> networkConnectors.
>>>>
>>>> I can't receive messages through BrokerA. If I send messages directly
>>>> to
>>>> BrokerB then my consumer receives the messages.
>>>>
>>>> Can someone help me?
>>>>
>>>> Thanks.
>>>> -Willy
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p17205663.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> 
>> -- 
>> Regards,
>> Hiram
>> 
>> Blog: http://hiramchirino.com
>> 
>> Open Source SOA
>> http://open.iona.com
>> 
>> 
> 
> 


-----
Thanks & Regards,

Benoit

http://www.Appendium.com   http://objectlab.blogspot.com

-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p17257682.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by Benoitx <be...@yahoo.com>.
Hi Hiram,

It seems that between 1.4.3 and 1.4.4 the exclude queues is not very
strict...

See this post:

http://www.nabble.com/5.1.0-Network-Brokers%3A-changes-since-4.1.1--to17206477s2354.html#a17206477

Thanks for your reply

Benoit.


Hiram Chirino wrote:
> 
> are all the brokers the same version or are you mixing them?
> 
> On Tue, May 13, 2008 at 6:45 AM, Benoitx <be...@yahoo.com> wrote:
>>
>> Has anyone found a solution to this?
>>
>> I've just upgraded from ActiveMQ 4.1.1 to 5.1.0 and suddenly all my
>> network
>> of brokers keep the messages in the local queues!  I think it is an issue
>> related to the first broker not forwarding messages to the second broker.
>> We
>> have an old 4.1.1 broker part of the network and it is the only one that
>> is
>> able to forward to BrokerB...
>>
>> I have checked the documentation...
>> http://activemq.apache.org/networks-of-brokers.html
>>
>> BrokerA:
>> <networkConnectors>
>>    <networkConnector name="objectlab-esb-client-to-esb-server-client1"
>> uri="static://(tcp://localhost:27000)" dynamicOnly="true"
>> conduitSubscriptions="true"
>>  decreaseNetworkConsumerPriority="false">
>>        <excludedDestinations>
>>            <queue physicalName="*" />
>>            <queue physicalName=">" />
>>            <topic physicalName="*" />
>>            <topic physicalName=">" />
>>        </excludedDestinations>
>>        <dynamicallyIncludedDestinations>
>>            <queue physicalName="queue.client1.from" />
>>        </dynamicallyIncludedDestinations>
>>    </networkConnector>
>> </networkConnectors>
>>
>> and BrokerB (where the consumers are)
>> <transportConnectors>
>>        <transportConnector uri="tcp://localhost:27000" />
>> </transportConnectors>
>>
>> The messages stay in the queue "queue.client1.from" in BrokerA...
>>
>> If BrokerA runs activeMQ 4.1.1 it all works ok...
>>
>> What am I doing wrong?
>>
>> Thanks a lot
>> Benoit
>> http://www.Appendium.com
>>
>>
>>
>> wha wrote:
>>>
>>> Okay, I figured out some things since my last post.
>>>
>>> But I'm still unable to make messages pass from Broker A to Broker B.
>>>
>>> I have the following activemq.xml:
>>>
>>>   <broker brokerName="brokerA" ....
>>>
>>>     <transportConnectors>
>>>        <transportConnector name="inFromProducer"
>>> uri="tcp://localhost:8881" />
>>>     </transportConnectors>
>>>
>>>     <networkConnectors>
>>>       <networkConnector name="outToBrokerB"
>>> uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="5"
>>> />
>>>     </networkConnectors>
>>>     ....
>>>
>>> So, I have a producer publishing messages to brokerA and then I'm trying
>>> to forward those messages to broker B. BrokerB has the following config:
>>>
>>> <broker brokerName="brokerB" ....
>>>     <transportConnectors>
>>>        <transportConnector name="inFromBrokerA"
>>> uri="tcp://localhost:9991"
>>> />
>>>          <transportConnector name="inFromConsumer"
>>> uri="tcp://localhost:9992"
>>> />
>>>     </transportConnectors>
>>>     ...
>>>
>>> On BrokerB I have a consumer connected to port:9992 and no
>>> networkConnectors.
>>>
>>> I can't receive messages through BrokerA. If I send messages directly to
>>> BrokerB then my consumer receives the messages.
>>>
>>> Can someone help me?
>>>
>>> Thanks.
>>> -Willy
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p17205663.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> Open Source SOA
> http://open.iona.com
> 
> 


-----
Thanks & Regards,

Benoit

http://www.Appendium.com   http://objectlab.blogspot.com

-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p17257363.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by Hiram Chirino <hi...@hiramchirino.com>.
are all the brokers the same version or are you mixing them?

On Tue, May 13, 2008 at 6:45 AM, Benoitx <be...@yahoo.com> wrote:
>
> Has anyone found a solution to this?
>
> I've just upgraded from ActiveMQ 4.1.1 to 5.1.0 and suddenly all my network
> of brokers keep the messages in the local queues!  I think it is an issue
> related to the first broker not forwarding messages to the second broker. We
> have an old 4.1.1 broker part of the network and it is the only one that is
> able to forward to BrokerB...
>
> I have checked the documentation...
> http://activemq.apache.org/networks-of-brokers.html
>
> BrokerA:
> <networkConnectors>
>    <networkConnector name="objectlab-esb-client-to-esb-server-client1"
> uri="static://(tcp://localhost:27000)" dynamicOnly="true"
> conduitSubscriptions="true"
>  decreaseNetworkConsumerPriority="false">
>        <excludedDestinations>
>            <queue physicalName="*" />
>            <queue physicalName=">" />
>            <topic physicalName="*" />
>            <topic physicalName=">" />
>        </excludedDestinations>
>        <dynamicallyIncludedDestinations>
>            <queue physicalName="queue.client1.from" />
>        </dynamicallyIncludedDestinations>
>    </networkConnector>
> </networkConnectors>
>
> and BrokerB (where the consumers are)
> <transportConnectors>
>        <transportConnector uri="tcp://localhost:27000" />
> </transportConnectors>
>
> The messages stay in the queue "queue.client1.from" in BrokerA...
>
> If BrokerA runs activeMQ 4.1.1 it all works ok...
>
> What am I doing wrong?
>
> Thanks a lot
> Benoit
> http://www.Appendium.com
>
>
>
> wha wrote:
>>
>> Okay, I figured out some things since my last post.
>>
>> But I'm still unable to make messages pass from Broker A to Broker B.
>>
>> I have the following activemq.xml:
>>
>>   <broker brokerName="brokerA" ....
>>
>>     <transportConnectors>
>>        <transportConnector name="inFromProducer"
>> uri="tcp://localhost:8881" />
>>     </transportConnectors>
>>
>>     <networkConnectors>
>>       <networkConnector name="outToBrokerB"
>> uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="5" />
>>     </networkConnectors>
>>     ....
>>
>> So, I have a producer publishing messages to brokerA and then I'm trying
>> to forward those messages to broker B. BrokerB has the following config:
>>
>> <broker brokerName="brokerB" ....
>>     <transportConnectors>
>>        <transportConnector name="inFromBrokerA" uri="tcp://localhost:9991"
>> />
>>          <transportConnector name="inFromConsumer" uri="tcp://localhost:9992"
>> />
>>     </transportConnectors>
>>     ...
>>
>> On BrokerB I have a consumer connected to port:9992 and no
>> networkConnectors.
>>
>> I can't receive messages through BrokerA. If I send messages directly to
>> BrokerB then my consumer receives the messages.
>>
>> Can someone help me?
>>
>> Thanks.
>> -Willy
>>
>
> --
> View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p17205663.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://open.iona.com

Re: Network of Brokers - Broker A talking to Broker B

Posted by Benoitx <be...@yahoo.com>.
Has anyone found a solution to this?

I've just upgraded from ActiveMQ 4.1.1 to 5.1.0 and suddenly all my network
of brokers keep the messages in the local queues!  I think it is an issue
related to the first broker not forwarding messages to the second broker. We
have an old 4.1.1 broker part of the network and it is the only one that is
able to forward to BrokerB...

I have checked the documentation...
http://activemq.apache.org/networks-of-brokers.html

BrokerA:
<networkConnectors>
    <networkConnector name="objectlab-esb-client-to-esb-server-client1"
uri="static://(tcp://localhost:27000)" dynamicOnly="true"
conduitSubscriptions="true"
 decreaseNetworkConsumerPriority="false">
	<excludedDestinations>
	    <queue physicalName="*" />
	    <queue physicalName=">" />
	    <topic physicalName="*" />
	    <topic physicalName=">" />
	</excludedDestinations>
	<dynamicallyIncludedDestinations>
	    <queue physicalName="queue.client1.from" />
	</dynamicallyIncludedDestinations>
    </networkConnector>
</networkConnectors>

and BrokerB (where the consumers are)
<transportConnectors>
	<transportConnector uri="tcp://localhost:27000" />
</transportConnectors>

The messages stay in the queue "queue.client1.from" in BrokerA...

If BrokerA runs activeMQ 4.1.1 it all works ok...

What am I doing wrong?

Thanks a lot
Benoit
http://www.Appendium.com



wha wrote:
> 
> Okay, I figured out some things since my last post.
> 
> But I'm still unable to make messages pass from Broker A to Broker B.
> 
> I have the following activemq.xml:
> 
>   <broker brokerName="brokerA" ....
> 
>     <transportConnectors>
>        <transportConnector name="inFromProducer"
> uri="tcp://localhost:8881" />
>     </transportConnectors>
> 
>     <networkConnectors>      
>       <networkConnector name="outToBrokerB"
> uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="5" />
>     </networkConnectors>
>     ....
> 
> So, I have a producer publishing messages to brokerA and then I'm trying
> to forward those messages to broker B. BrokerB has the following config:
> 
> <broker brokerName="brokerB" ....
>     <transportConnectors>
>        <transportConnector name="inFromBrokerA" uri="tcp://localhost:9991"
> />
> 	   <transportConnector name="inFromConsumer" uri="tcp://localhost:9992"
> />
>     </transportConnectors>
>     ...
> 
> On BrokerB I have a consumer connected to port:9992 and no
> networkConnectors.
> 
> I can't receive messages through BrokerA. If I send messages directly to
> BrokerB then my consumer receives the messages.
> 
> Can someone help me?
> 
> Thanks.
> -Willy
> 

-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p17205663.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by wha <wi...@cgi.com>.
Okay, I figured out some things since my last post.

But I'm still unable to make messages pass from Broker A to Broker B.

I have the following activemq.xml:

  <broker brokerName="brokerA" ....

    <transportConnectors>
       <transportConnector name="inFromProducer" uri="tcp://localhost:8881"
/>
    </transportConnectors>

    <networkConnectors>      
      <networkConnector name="outToBrokerB"
uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="5" />
    </networkConnectors>
    ....

So, I have a producer publishing messages to brokerA and then I'm trying to
forward those messages to broker B. BrokerB has the following config:

<broker brokerName="brokerB" ....
    <transportConnectors>
       <transportConnector name="inFromBrokerA" uri="tcp://localhost:9991"
/>
	   <transportConnector name="inFromConsumer" uri="tcp://localhost:9992" />
    </transportConnectors>
    ...

On BrokerB I have a consumer connected to port:9992

I can't receive messages through BrokerA. If I send messages directly to
BrokerB then my consumer receives the messages.

Can someone help me?

Thanks.
-Willy
-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15550385.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Network of Brokers - Broker A talking to Broker B

Posted by wha <wi...@cgi.com>.
My Consumer works when I send messages locally.
The problem seems to be that BrokerA is not sending the messages to BrokerB.



wha wrote:
> 
> Hi,
> 
> I'm using the latest snapshot 5.1
> 
> I'm having some problems with a really simple setup. I want broker A to
> send its messages to Broker B.
> Broker A has a producer and Broker B has a consumer.
> 
> Here's my config for broker A:
> 
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>   
>   <broker xmlns="http://activemq.org/config/1.0" brokerName="brokerA"
> dataDirectory="${activemq.base}/data" useJmx="true"
> advisorySupport="false">
>   
> 
>     <!-- The transport connectors ActiveMQ will listen to -->
>     <transportConnectors>
> 
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>        <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>
> 
>     </transportConnectors>
> 
>     <!-- The store and forward broker networks ActiveMQ will listen to -->
>     <networkConnectors>
>       
>       <networkConnector name="host1 and host2"
> uri="static://(tcp://10.166.163.149:61616)" dynamicOnly="true"
> networkTTL="2"/>
>       
>     </networkConnectors>
> 
> 
> 
> Here's my config for Broker B:
> 
> 
> 
>  <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
>   
>   <broker xmlns="http://activemq.org/config/1.0" brokerName="brokerB"
> dataDirectory="${activemq.base}/data" useJmx="true"
> advisorySupport="false">
>   
> 
>     <!-- The transport connectors ActiveMQ will listen to -->
>     <transportConnectors>
> 
>        <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>        <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>
> 
>     </transportConnectors>
> 
>     <!-- The store and forward broker networks ActiveMQ will listen to -->
>     <networkConnectors>
>       
>       <networkConnector name="host1 and host2"
> uri="static://(tcp://10.166.163.108:61616)" dynamicOnly="true"
> networkTTL="2"/>
>       
>     </networkConnectors>
> 
> 
> Is there anything else I need to considerate ?
> 
> Thanks.
> 

-- 
View this message in context: http://www.nabble.com/Network-of-Brokers---Broker-A-talking-to-Broker-B-tp15510192s2354p15510200.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.