Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D21810558 for ; Thu, 5 Dec 2013 22:02:46 +0000 (UTC) Received: (qmail 15817 invoked by uid 500); 5 Dec 2013 22:02:45 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 15784 invoked by uid 500); 5 Dec 2013 22:02:45 -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 15776 invoked by uid 99); 5 Dec 2013 22:02:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 22:02:45 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tabish121@gmail.com designates 209.85.213.43 as permitted sender) Received: from [209.85.213.43] (HELO mail-yh0-f43.google.com) (209.85.213.43) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Dec 2013 22:02:39 +0000 Received: by mail-yh0-f43.google.com with SMTP id a41so12478458yho.2 for ; Thu, 05 Dec 2013 14:02:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=nAD6VBUNQOxrTfpyQFUpCGMe7U4P8V9wpdwv3WPWHuU=; b=VwnqDKmDbMuZ3Ic4UpJP1xTDbHFNvRr5EJFfpFGSwifHz/B6dKU538XDICBxW379mX wmdrIjSSlDKXQNWuyTE+b7IjzZCopRpl32BnU2xGmS5COUmPEhN8cbI5JinHfFjXCOZ5 kyP3xkHYVWV5iML4Xj2EviyaHvsMR9pxpUgGIfjXIpYDBDy+Pos3as/kn2UGGV8Rz5QI 6ZAumV8IVCzHmiyCSbFTJhs5KxAwamo/7k/d7uPH1IcZGBvmsLdH/i3sqzkkyejYeRsw dnsDTnBAru7XPowKDAvWe8armBK1VmxCb8jVnUB5KdkzquHjDGYMtdC7pI3mi41O04yC X7MA== X-Received: by 10.236.100.8 with SMTP id y8mr44172yhf.128.1386280938472; Thu, 05 Dec 2013 14:02:18 -0800 (PST) Received: from [192.168.2.150] (c-98-218-173-79.hsd1.va.comcast.net. [98.218.173.79]) by mx.google.com with ESMTPSA id h23sm93202489yhc.0.2013.12.05.14.02.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 14:02:17 -0800 (PST) Message-ID: <52A0F7E8.5020106@gmail.com> Date: Thu, 05 Dec 2013 17:02:16 -0500 From: Timothy Bish User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: users@activemq.apache.org Subject: Re: Active MQ - fail-over uri configuration References: 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 On 12/05/2013 04:55 PM, Vladimir Sutskever wrote: > Hi > > I am using the a failover URI with ActiveMQ's Connection Factory for a Java message consumer. > > failover:(tcp://primary:61616,tcp://secondary:61616)?randomize=false > > > The connection successfully fails over to the secondary host once primary host is down. > But it won't get re-established back with primary host once the primary host goes back up. > I need to kill the secondary site to trigger the swap back to primary. > > Is there a configuration that will ping the primary site and switch to it once its up? > > > > > > Thanks > > Vladimir > Look at the priority backup feature: http://activemq.apache.org/failover-transport-reference.html -- Tim Bish Sr Software Engineer | RedHat Inc. tim.bish@redhat.com | www.fusesource.com | www.redhat.com skype: tabish121 | twitter: @tabish121 blog: http://timbish.blogspot.com/