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 E663C96C6 for ; Fri, 16 Mar 2012 09:16:28 +0000 (UTC) Received: (qmail 55339 invoked by uid 500); 16 Mar 2012 09:16:28 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 55195 invoked by uid 500); 16 Mar 2012 09:16:27 -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 55185 invoked by uid 99); 16 Mar 2012 09:16:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 09:16:27 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of torsten@fusesource.com designates 74.125.245.78 as permitted sender) Received: from [74.125.245.78] (HELO na3sys010aog105.obsmtp.com) (74.125.245.78) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Mar 2012 09:16:19 +0000 Received: from mail-ee0-f51.google.com ([74.125.83.51]) (using TLSv1) by na3sys010aob105.postini.com ([74.125.244.12]) with SMTP ID DSNKT2MEzbzuOH6crltcubNF5kzp4FV6ocp2@postini.com; Fri, 16 Mar 2012 02:15:59 PDT Received: by eeke50 with SMTP id e50so2479595eek.24 for ; Fri, 16 Mar 2012 02:15:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=1OkMFaAVh4SmNOpayLA/IamiFj8qXIQekVCrCcmbdr8=; b=iuCUSIyIpnMwo7CUKMfj6e8CpRmZXzA6fR4l/Foduth5H+yKq1dd+Iib1MtzNcHGaM FsjKb4iWAu0wR6ZtOzT5yFAUWBM1IeIWRujj0czsjhJEhy74oDulK+dtClAAUz5H73EY sSrEjmkN3UyRe09Cda1WPexiHA+o/Zeub7cvg+EUVmLV88WRf/YwIkSgJY9li9BtrYHf MbFNFcth3t7Qhyq7Mf56+hOZ5X4pLq3Yi/unpDu8ndFIjH8nc/qqQqQ7z077/6wosvLO mf5qEVvpbAwVP/U6ZVWkFD33JLoMnGieD0BUnoV8/bxEvkCkR4lWIDJiDZEd/G6FzyEm E3mg== Received: by 10.213.28.196 with SMTP id n4mr111868ebc.0.1331889356012; Fri, 16 Mar 2012 02:15:56 -0700 (PDT) Received: from [192.168.178.31] (p57BD6646.dip0.t-ipconnect.de. [87.189.102.70]) by mx.google.com with ESMTPS id p57sm16225832eei.8.2012.03.16.02.15.54 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Mar 2012 02:15:54 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Ordering of messages with a network of brokers ... From: Torsten Mielke In-Reply-To: Date: Fri, 16 Mar 2012 10:15:52 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <699408C8-E48D-4BFF-810B-D35A2D84C7CB@fusesource.com> References: To: users@activemq.apache.org X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQl3k+if2sss5ZnOFjSNmS0xy+j16wNVI799+jWchMfeHDv9ky/Mdgc/fVyRxEKZu03JiNy7 X-Virus-Checked: Checked by ClamAV on apache.org Hello Greg, Both statements are correct. The first link refers to running a single = broker instance. In that case messages will be dispatched in order to = all topic consumers and in round-robin fashion to all queue consumers. Your second quote refers to the fact that when running broker instances = in a broker network (each node in the network runs a single broker, not = a master/slave pair) messages may be trapped in a broker if that broker = goes down and hence potentially cannot be delivered in order (i.e. if = another producer connected to a different broker in the network = continues to produce msgs on the same destination, these msgs will be = dispatched). The messages on the crashed broker can only be delivered = whenever that crashed broker is restarted. This could potentially take = some time, depending on how quickly you can recover from that crash.=20 One possible solution is to create a broker network with master/slave = pairs on each node. In that case the slave broker will be able to take = over after a master broker crash within a few seconds. As that failover = still takes a couple of seconds, you still have the potential that for = that period of time messages may be delivered out of order.=20 > or with a network of brokers will the other > brokers store up the messages from the producer until the failed > broker recovers, thus preserving the order during delivery? No, that will not happen. Other brokers will continue to accept and = dispatch messages and hence the order of messages being dispatched may = not be preserved.=20 Hope this helps. Torsten Mielke torsten@fusesource.com tmielke@blogspot.com On Mar 15, 2012, at 6:08 PM, Greg Thomas wrote: > I note at = http://activemq.apache.org/how-do-i-preserve-order-of-messages.html > that is says "ActiveMQ will preserve the order of messages sent by a > single producer to all consumers on a topic". >=20 > However, at http://activemq.apache.org/clustering.html it says: >=20 > The problem with running lots of stand alone brokers or brokers in a > network is that messages are owned by a single physical broker at any > point in time. If that broker goes down, you have to wait for it to be > restarted before the message can be delivered. >=20 > Now does that mean that the FAQ in the first link only applies to > non-clustered solutions; or with a network of brokers will the other > brokers store up the messages from the producer until the failed > broker recovers, thus preserving the order during delivery? >=20 > Thanks, >=20 > Greg