From users-return-16271-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Wed Oct 01 16:26:26 2008 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 66774 invoked from network); 1 Oct 2008 16:26:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Oct 2008 16:26:26 -0000 Received: (qmail 66417 invoked by uid 500); 1 Oct 2008 16:26:24 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 66400 invoked by uid 500); 1 Oct 2008 16:26:24 -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 66389 invoked by uid 99); 1 Oct 2008 16:26:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 09:26:24 -0700 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 thomas.corbin@gmail.com designates 64.233.170.187 as permitted sender) Received: from [64.233.170.187] (HELO rn-out-0910.google.com) (64.233.170.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 16:25:22 +0000 Received: by rn-out-0910.google.com with SMTP id j67so213613rne.21 for ; Wed, 01 Oct 2008 09:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:organization:to :subject:date:user-agent:x-face:mime-version:content-type:message-id; bh=LWNuOf5Th0k+3RNjhoUIuF34V9ibxJOQOJhObPKFF2Q=; b=jpBt+5ToI98m5PSoEUQYSEoYrBgix0pgE/3wdg8wkSsemjUF26otbmpIDneq/FCIbP 1hdhJ+aQKWzOJBrlkIr7ZNz7oKETafXEqsDHz5TV+J2XHvEi48jjK6KUGiGA642mDUa4 9lSslOPOjNBBg0bZCTfgWb7EL7lbsMZJndVNY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:organization:to:subject:date:user-agent:x-face :mime-version:content-type:message-id; b=njlpebNk8eLLa/ZFcNkfJ/9Oq/4gdhn/XQR6Wtp3EBkzaNjZYAPE+O5Q83XKFT+oT0 B9KD/lCB7OekeNNrsdS9ANZC/Wv+sxPa4VZ00MTMyAtIaH4fdtCqA4tIBKqpaxe67dMw YcY92Y9XCc/TsBft6HQUSrhp+UtUTsL029fnY= Received: by 10.151.108.5 with SMTP id k5mr12286985ybm.226.1222878356092; Wed, 01 Oct 2008 09:25:56 -0700 (PDT) Received: from sam.localnet (r74-192-147-239.gtwncmta01.grtntx.tl.dh.suddenlink.net [74.192.147.239]) by mx.google.com with ESMTPS id e27sm93674elf.12.2008.10.01.09.25.55 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Oct 2008 09:25:55 -0700 (PDT) From: "Thomas R. Corbin" Reply-To: thomas.corbin@gmail.com Organization: SamSix, Inc. To: users@activemq.apache.org Subject: Not quite sure where to go next - network bridging, reliable delivery, store and forward. Date: Wed, 1 Oct 2008 11:25:17 -0500 User-Agent: KMail/1.9.50 (KDE/4.0.4; ; ) X-Face: Pd)OdRaGTkeXYxF,~LJ1'n]}z.L=BneKBOpD.^{uD;&~aV`ud/'`SNnj2P1EkJnYK3Lo< =?utf-8?q?Y=0A=09c!4=7B?="MT|n[](scY%0FWY9N%C-j|{zUG/"FFq'(iYq9e!O"&O/AKZ'"=oUX3F:ILyU-, =?utf-8?q?!Ok=0A=09pbP=23=7E-iVx4=7E=5CG?= =?utf-8?q?=0A=09=3Bk=5FqB!xB?=<4,E3RXWBaIiX7vq">OD`]1P<_^" =?utf-8?q?=2E*s=3DV=3D3q=7CRwOdhp=239c=3BSLeG=7Cg3=2EZmF=7BM2a=0A=09g=23?= MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_tR64IfLYbWCPX9t" Message-Id: <200810011125.18084.thomas.corbin@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org --Boundary-00=_tR64IfLYbWCPX9t Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Now, it seems like the recommendation is for Master/Slave for reliable delivery, but I don't think we can do that. We've got field laptops which may or may not have connectivity with the central office, but they want to be able to run the application and have it send messages that get delivered when the network comes up. And the client wants the central office to be able to send assignments to the field whether or not the network to the field laptop is up. So for the field laptops I've set up an embedded broker which then connects to a central office broker. The reason is that the application won't come up if there isn't a local broker that it can connect to. If the application is started w/o a local broker or a connection to the central office it doesn't come up. Plus, I wanted the local message persistence so that the user of the application can trigger messages to be sent even when the connection to the central office isn't present. In the central office we've get server processes also with embedded brokers. I've been fiddling with the setup configuration for the embedded brokers and the central office brokers and I've gotten to the point that messages from the field get sent to the central office on reconnect, but don't get sent from the central office to the field on reconnect. And everything works if everything is connected. But if the laptop isn't connected to the central office when the central office sends out assignments to the field, then the laptop will never see those messages. I've tried using durable subscription topics, I've tried setting "conduitSubscriptions" to both true and false - and I'm not sure if I should set it one way for the central office broker and the same or different for the laptop and server process embedded brokers. The network kind of looks like this: Field laptop|---------|central office broker|-----|Server Process| The central office broker is intended to be the "master", in as much as there is a master - this isn't really a master/slave setup. I can use JMX to look at the enqueue/dequeue counts to see where messages are getting hung up - but I am not ever sure why. I had thought that with durable subscriptions, the messages would get sent, but that *seems* not to be the case. I have looked through ActiveMQ bug reports and the online documentation. Of which there is a lot, but I am still quite confused. Seeing as how I'm doing the embedded broker set up in Groovy, rather than in spring or xbean - should I explicitly be using a DemandForwardingBridge as in the ThreeBroker tests? Or does the underlying code just use it anyway? What would that imply for the activemq.xml config file for the master broker? Is there configuration that explicitly says use a DemandForwardingBridge? Or is the DemandForwardingBridge not the issue? What should these values be set to? decreaseNetworkConsumerPriority="false" conduitSubscriptions="true" bridgeTempDestinations="true" duplex="true" Sorry for such a newbie set of questions and so long an email. --Boundary-00=_tR64IfLYbWCPX9t Content-Type: text/x-csrc; charset="us-ascii"; name="JmsBroker.groovy" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="JmsBroker.groovy" /* * $$ * *************************************************************************** * * Copyright (c) 2006 Coned. All rights reserved. * * Company: http://www.coned.com * *************************************************************************** */ package com.coned.util.db; import java.net.URI; import javax.sql.DataSource import org.apache.activemq.broker.BrokerService import org.apache.activemq.network.NetworkConnector import org.apache.activemq.network.DiscoveryNetworkConnector import org.apache.activemq.broker.jmx.ManagementContext import org.apache.activemq.store.journal.JournalPersistenceAdapterFactory import org.apache.activemq.broker.view.ConnectionDotFilePlugin import org.apache.activemq.broker.view.DestinationDotFilePlugin import org.apache.derby.jdbc.EmbeddedDataSource import org.apache.log4j.Logger; import com.samsix.util.LoggerControl import com.samsix.util.HostNameProvider /** * Utility to create the jms broker. */ public class JmsBroker { private static final Logger logger = Logger.getLogger( JmsBroker ); String applicationNickname; String transportConnectorUri; String networkConnectorUri; DataSource dataSource public void createBroker() { turnOnActiveMqLogging() BrokerService broker = new BrokerService(); // configure the broker broker.brokerName = getBrokerName() broker.useJmx = true; broker.dataDirectory = getDataDirectory() // // Suggested via email. Also see: // // http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/network/NetworkLoadTest.java?view=markup // broker.getManagementContext().setCreateConnector( false ); //logger.error "data directory: ${getDataDirectory()}" addPlugins( broker ) addNetworkConnector( broker ) addManagementContext( broker ) addPersistenceAdaptor( broker ) broker.addConnector( transportConnectorUri ); broker.start(); } def addPersistenceAdaptor( broker ) { EmbeddedDataSource dataSource = new EmbeddedDataSource() JournalPersistenceAdapterFactory factory = new JournalPersistenceAdapterFactory() dataSource.databaseName = getDataDirectory() + File.separator + "derbydb" dataSource.createDatabase = "create" factory.journalLogFiles = 5 factory.dataDirectory = getDataDirectory() factory.dataSource = dataSource broker.persistenceFactory = factory } def addManagementContext( broker ) { ManagementContext context = new ManagementContext() context.useMBeanServer = true context.createConnector = true context.connectorPort = getJmxPort() context.jmxDomainName = "org.apache.activemq" broker.managementContext = context } def addNetworkConnector( broker ) { // NetworkConnector connector = broker.addNetworkConnector( networkConnectorUri ); NetworkConnector connector = new DiscoveryNetworkConnector( new URI( networkConnectorUri ) ) connector.name = "masterJms" connector.duplex = true connector.dynamicOnly = false // // just read something from james strachan... // "For demand forwarding I think you need to set org.foo.bar --Boundary-00=_tR64IfLYbWCPX9t--