From users-return-12772-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Tue Feb 19 21:19:35 2008 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 59599 invoked from network); 19 Feb 2008 21:19:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Feb 2008 21:19:34 -0000 Received: (qmail 69880 invoked by uid 500); 19 Feb 2008 21:19:28 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 69859 invoked by uid 500); 19 Feb 2008 21:19:28 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 69850 invoked by uid 99); 19 Feb 2008 21:19:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2008 13:19:28 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bruce.snyder@gmail.com designates 64.233.184.233 as permitted sender) Received: from [64.233.184.233] (HELO wr-out-0506.google.com) (64.233.184.233) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2008 21:18:53 +0000 Received: by wr-out-0506.google.com with SMTP id c55so2148064wra.0 for ; Tue, 19 Feb 2008 13:18:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=sCbWRDiBF1R7X3Amtv8YylH5IzVNbe7Tm2HA0BoFjVY=; b=TBc0Otr7lnlz+RGf5rJAfv7Vz9Uo95aOtrScTMrmzGqX+hQ1xFHCPw1npdbDS1KA8NQyy6Fny5aiXxIBXl8IrpqpK6pyNmsrb7ByudXBX0rd6fDhUCk+KV6bup5K5anvbTLIbtXHm0mIzXn1zGBaCKiI9TK8tVs6eFzf17j0Zso= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=g7D2PHE7V8e0vcNWnzNpyyg4CmonfwSfQUO1/uTMpLb7TKZ2tP9+C8WiCpi1ldLFL00yemunFkvYwluXVzSiMO1u8F/GiCP+elrlFKRk7K+DQYmExe2H7rRL+pVrpIhHzYAXVspRuKgY0BwTdlWzwJoxUzkgkrcf4DO2o1U4weo= Received: by 10.142.177.7 with SMTP id z7mr5780993wfe.47.1203455936569; Tue, 19 Feb 2008 13:18:56 -0800 (PST) Received: by 10.142.229.19 with HTTP; Tue, 19 Feb 2008 13:18:56 -0800 (PST) Message-ID: <7b3355cb0802191318g13129d70nc2fcee6126ca7281@mail.gmail.com> Date: Tue, 19 Feb 2008 14:18:56 -0700 From: "Bruce Snyder" To: users@activemq.apache.org Subject: Re: Network of Brokers - Broker A talking to Broker B In-Reply-To: <15562341.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <15510192.post@talk.nabble.com> <7b3355cb0802181947r3c254absd556248299a4f60c@mail.gmail.com> <15561548.post@talk.nabble.com> <15562329.post@talk.nabble.com> <15562341.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org On Feb 19, 2008 10:38 AM, 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 > > brokerName="brokerA" > dataDirectory="${activemq.base}/data" > useJmx="true" > advisorySupport="false"> > > > /> > > > > uri="static://(tcp://localhost:9991)" dynamicOnly="true" networkTTL="3"> > > > > > Here's my BrokerB, activemq.xml > > brokerName="brokerB" > dataDirectory="${activemq.base}/data" > useJmx="true" > advisorySupport="true"> > > > /> > > > > > > > > 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