From users-return-8368-apmail-activemq-users-archive=activemq.apache.org@activemq.apache.org Tue Apr 03 07:58:15 2007 Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 59756 invoked from network); 3 Apr 2007 07:58:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Apr 2007 07:58:15 -0000 Received: (qmail 88164 invoked by uid 500); 3 Apr 2007 07:58:21 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 88144 invoked by uid 500); 3 Apr 2007 07:58:21 -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 88135 invoked by uid 99); 3 Apr 2007 07:58:21 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 00:58:21 -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 james.strachan@gmail.com designates 66.249.82.236 as permitted sender) Received: from [66.249.82.236] (HELO wx-out-0506.google.com) (66.249.82.236) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Apr 2007 00:58:13 -0700 Received: by wx-out-0506.google.com with SMTP id h29so1550402wxd for ; Tue, 03 Apr 2007 00:57:52 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SNTjU5cpVp4eeqyNr4gxrtmgIT3uWMrW974Adsqd2irdx0ApUWE5r9FhjojM6vrBm0JHrYtT5Bh/bQrQkhndlbDzSYSmPVduUSCdG+wMaHC5DSfUSEkK/G3i6l8s/hHFGcMa+4/JmFoQaAyhJwlafaU08dUtmQz7YOIbkVWUhI8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ec6dNrjrq66b1RpprWkoe42tO4UJzxeizYdQoScDS7nvMsHgORbS0TaTZofaXO0je4Os894UAAIajVxYC9P8aZVykkc7J3IkT564dDlYWQA3Gg/0x2tmLH6dPotXmZcJaCidHSYexAYCya4zWdpk6rtRXcroxSXT0d5U44RKCU4= Received: by 10.90.52.2 with SMTP id z2mr4091609agz.1175587072547; Tue, 03 Apr 2007 00:57:52 -0700 (PDT) Received: by 10.90.51.6 with HTTP; Tue, 3 Apr 2007 00:57:52 -0700 (PDT) Message-ID: Date: Tue, 3 Apr 2007 08:57:52 +0100 From: "James Strachan" To: users@activemq.apache.org Subject: Re: Best approach for HA message broker + grid In-Reply-To: <461203F8.8030606@tid.es> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <461203F8.8030606@tid.es> X-Virus-Checked: Checked by ClamAV on apache.org On 4/3/07, Manuel Teira wrote: > Hello. > > My aim is to have a set of brokers, running in different machines, to > consume messages coming from different clients, to be able to scale the > system for future needs. Furthermore, HA features are also required, to > protect the system on hardware malfunction. > > Looking at the alternatives that ActiveMQ provides to achieve these > goals, it seems to me that I could get the grid behaviour using the > "Network of Brokers" feature, where all the brokers are "alive". Not quite. HA is done my Master/Slave. The "Network of Brokers" is purely for store and forward. http://activemq.apache.org/masterslave.html Multiple Master/Slave clusters would do the trick; you may want to connect the broker clusters together in a store and forward network but its not essential. > I understand that when more than one broker have consumers for a given > queue, the messages are shared among them. But in my first tests, I've > found that most of times, all the messages get consumed by one of the > brokers. Could this be caused by a (default) high prefetch value? When using store and forward, messages only move to another broker if there are no local consumers. http://activemq.apache.org/consumer-priority.html > Talking about the HA needs, I've read that a master-slave aproximation > could be used, but here I won't have the grid behaviour benefits of the > "Network of brokers" approach (as only one of the brokers is actually > active). I would like to have a combined behaviour, where messages > persist a hardware failure (better if restarting the failing node was > not needed to restore them), and where messages were shared among > consumers from different brokers. > > I was thinking about using a "Network of Brokers" with a low prefetch > value for the shared queues and disable journal files, to minimize the > amount of messages "owned" by a given broker. As the database is located > in a different machine, I could always restart a new broker using the > schema of the failing one. Is this a right approach? With Network Of Brokers, exactly one broker owns a message at any point in time so you are exposed to hardware failure & there is no HA. If a broker goes down, its messages remain lost until it is rebooted; whereas with Master/Slave you get HA. -- James ------- http://radio.weblogs.com/0112098/