Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 96855 invoked from network); 2 Jul 2010 10:12:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jul 2010 10:12:13 -0000 Received: (qmail 69900 invoked by uid 500); 2 Jul 2010 10:12:12 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 69791 invoked by uid 500); 2 Jul 2010 10:12:10 -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 69783 invoked by uid 99); 2 Jul 2010 10:12:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 10:12:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.239.154.11] (HELO adonis.tweakers.net) (213.239.154.11) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jul 2010 10:12:01 +0000 Received: from localhost (localhost [127.0.0.1]) by adonis.tweakers.net (Postfix) with ESMTP id 342385DC0D7 for ; Fri, 2 Jul 2010 12:11:41 +0200 (CEST) Received: from adonis.tweakers.net ([127.0.0.1]) by localhost (adonis.tweakers.net [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 29447-06 for ; Fri, 2 Jul 2010 12:11:41 +0200 (CEST) Received: from [192.168.1.33] (82-169-23-111.ip.telfort.nl [82.169.23.111]) by adonis.tweakers.net (Postfix) with ESMTPSA id F1A4E5DC0BB for ; Fri, 2 Jul 2010 12:11:40 +0200 (CEST) Message-ID: <4C2DBB5C.9070507@tweakers.net> Date: Fri, 02 Jul 2010 12:11:40 +0200 From: Arjen van der Meijden User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.4) Gecko/20100608 Lightning/1.0b2 Thunderbird/3.1 MIME-Version: 1.0 To: users@activemq.apache.org Subject: Re: Failover-connection config halts start-up when no ActiveMQ available References: <4C2DA941.6020505@tweakers.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thanks, that seems to work. Best regards, Arjen On 2-7-2010 11:06 Gary Tully wrote: > There is a *startupMaxReconnectAttempts *option on the failover transport > that allow the transport to fail early on the first connect attempt so that > spring gets a chance to do retries rather than have the connection block > pending the broker start. > > see: https://issues.apache.org/activemq/browse/AMQ-2385 > > On 2 July 2010 09:54, Arjen van der Meijden wrote: > >> Hi, >> >> We have a simple single-server ActiveMQ-setup with multiple consumers, some >> of which use Java and connect via JMS. As the ActiveMQ-server might some >> times need a restart or some other down time we configured it to use the >> failover protocol (failover:tcp://localhost:61616), so it will reconnect as >> soon as its available again and will also keep the connection alive when >> there are long periods of silence. >> >> All this is managed via Spring's normal connection handling. >> >> This works fine, unless the ActiveMQ-server is not available during the >> initial start. Rather than just going into the background and waiting for >> the availability of a connection it blocks the start-up without any error >> message. >> In my case its a spring-managed Servlet that will receive some cache-update >> messages via jsm-topics. But rather than connecting in the background to >> activemq, the entire Tomcat-instance is blocked and although it will accept >> new http-connections, it will do absolutely nothing with them. >> >> My spring-configuration is like this: >> >> >> >> >> >> >> >> > destination-type="topic"> >> >> >> >> I'm not really sure what the best solution would be, but I'd expect to get >> some ERROR-message at the very least. It is the reason my application won't >> start indefinitely (or until activemq is started, whichever comes first). >> Its something you easily overlook during debugging and it is very hard to >> detect when you don't know what you're looking for (or even if you do, but >> just forget to check activemq is running and/or a connection is made). >> Logging should be possible, as I do get these kind of messages if it does >> work: >> >> 2010-07-02 09:36:00,095 [ActiveMQ Task] INFO >> o.a.activemq.transport.failover.FailoverTransport - Successfully connected >> to tcp://localhost:61616 >> >> Perhaps the easiest fix would be to display a ERROR-message the first time >> it can't connect and than fall back to DEBUG-messages. >> >> Best regards, >> >> Arjen >> > > >