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.

Reply via email to