Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 31809 invoked from network); 6 Jun 2007 15:31:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jun 2007 15:31:13 -0000 Received: (qmail 9129 invoked by uid 500); 6 Jun 2007 15:31:16 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 9097 invoked by uid 500); 6 Jun 2007 15:31:15 -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 9087 invoked by uid 500); 6 Jun 2007 15:31:15 -0000 Delivered-To: apmail-geronimo-activemq-users@geronimo.apache.org Received: (qmail 9084 invoked by uid 99); 6 Jun 2007 15:31:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2007 08:31:15 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of mteira@tid.es designates 193.145.240.2 as permitted sender) Received: from [193.145.240.2] (HELO correo.tid.es) (193.145.240.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jun 2007 08:31:11 -0700 Received: from tid (filvit [192.168.48.202]) by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0JJ800C7Z0FCBV@tid.hi.inet> for activemq-users@geronimo.apache.org; Wed, 06 Jun 2007 17:30:49 +0200 (MEST) Received: from [10.95.89.22] by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0JJ800C7Q0F9BV@tid.hi.inet> for activemq-users@geronimo.apache.org; Wed, 06 Jun 2007 17:30:48 +0200 (MEST) Date: Wed, 06 Jun 2007 17:30:45 +0200 From: Manuel Teira Subject: AMQ 4.1.1 and TransportConnector brokerName Sender: mteira@tid.es To: activemq-users@geronimo.apache.org Message-id: <4666D325.3050001@tid.es> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) X-Virus-Checked: Checked by ClamAV on apache.org Hello. My aim is to be able to have different clusters (JDBC master-slave) running in the same local network. I also want to be able to discover the running nodes from the clients, and so I was using a discoverUri (multicast://default) in the TransportConnector and the proper configuration for the clients. But to be able to isolate the different clusters, I think that I need to use different discoveryUris. The first question is about the meaning of that uri multicast://default. Is that the same than using: public static final String DEFAULT_DISCOVERY_URI_STRING="multicast://239.255.2.3:6155"; ? I've also seen that there's a property in the MulticastDiscoveryAgent called group. Its default value is 'default', is that related with the 'default' token in the URI? I wonder if URIs like multicast:// using different tokens for the different clusters should be enough to discriminate them. This is related with the following question: Looking at the source code, it seems that the multicast code is using the brokerName of the TransportConnector to be able to discriminate different clusters, as the packet payload has something like: String payload=getType(); payload+=started.get()?ALIVE:DEAD; payload+=DELIMITER+brokerName+DELIMITER; payload+=selfService; in org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent But while starting; I get a warning that seems to be written from MulticastDiscoveryAgent.start() if (brokerName == null || brokerName.length()==0){ log.warn("brokerName not set"); } Looking a little more in the code, it seems that the brokerName should be set by org.apache.activemq.broker.TransportConnector, before starting the DiscoveryAgent, its start() method says: if( da!=null ) { da.setBrokerName(getBrokerInfo().getBrokerName()); da.registerService(getConnectUri().toString()); da.start(); } So, the brokerName is the one in the BrokerInfo private instance of the TransportConnector, that is set using TransportConnector.setBrokername(String brokerName) This is what I have in the xml configuration file: In the activeMQ log, I see how spring is aware of the brokerName property, and it seems to set it: [DEBUG][2007-06-06 17:03:13,266][main][org.springframework.beans.CachedIntrospectionResults] Caching PropertyDescriptors for class [org.apache.activemq.broker.TransportConnector] ... [DEBUG][2007-06-06 17:03:13,267][main][org.springframework.beans.CachedIntrospectionResults] Found bean property 'brokerName' of type [java.lang.String] ... [DEBUG][2007-06-06 15:37:25,748][main][org.springframework.beans.BeanWrapperImpl] About to invoke write method [public void org.apache.activemq.broker.TransportConnector.setBrokerName(java.lang.String)] on object of class [org.apache.activemq.broker.TransportConnector] [DEBUG][2007-06-06 15:37:25,748][main][org.springframework.beans.BeanWrapperImpl] Invoked write method [public void org.apache.activemq.broker.TransportConnector.setBrokerName(java.lang.String)] with value of type [java.lang.String] But, anyway, I'm getting multiple warnings like this: [WARN ][2007-06-06 15:37:27,459][main][org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent] brokerName not set Perhaps they are from different MulticastDiscoveryAgents than the one bound to the TransportConnector? So, please. Could you explain or direct me to some information source where I could learn how to write a proper multicast URI, and what is the meaning of its fields? Thanks a lot.