Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 22864 invoked from network); 10 Nov 2006 19:54:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Nov 2006 19:54:25 -0000 Received: (qmail 6544 invoked by uid 500); 10 Nov 2006 19:54:35 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 6527 invoked by uid 500); 10 Nov 2006 19:54:35 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 6517 invoked by uid 99); 10 Nov 2006 19:54:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2006 11:54:35 -0800 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 chirino@gmail.com designates 66.249.92.172 as permitted sender) Received: from [66.249.92.172] (HELO ug-out-1314.google.com) (66.249.92.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Nov 2006 11:54:22 -0800 Received: by ug-out-1314.google.com with SMTP id m2so759257ugc for ; Fri, 10 Nov 2006 11:54:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=LqO/GgUNur6b33x5LsTn1511cQJg+U0OYKOTbDUTo58G4CfrhNzU7B8FQnjqprZ91b6PvIRQox14OZVcH28Bu/sgALn2VsEPOHHLw505KHq4s0Gd96EHpHf2RoCaezlkwJWcjYHlJLwybKv7gXLz0yMkD14Ag5qa23legzsLZbY= Received: by 10.78.52.17 with SMTP id z17mr2934433huz.1163188440902; Fri, 10 Nov 2006 11:54:00 -0800 (PST) Received: by 10.78.142.5 with HTTP; Fri, 10 Nov 2006 11:54:00 -0800 (PST) Message-ID: Date: Fri, 10 Nov 2006 14:54:00 -0500 From: "Hiram Chirino" Sender: chirino@gmail.com To: activemq-users@geronimo.apache.org Subject: Re: Bug in failover transport In-Reply-To: <7271859.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7213887.post@talk.nabble.com> <7258236.post@talk.nabble.com> <7261062.post@talk.nabble.com> <7261560.post@talk.nabble.com> <7265309.post@talk.nabble.com> <7271859.post@talk.nabble.com> X-Google-Sender-Auth: 3956acf4fe3aec43 X-Virus-Checked: Checked by ClamAV on apache.org This is tricky bug, but it might be normal. It gets a little complicated, but let me try to explain what I think is happening: (1) Say broker sends messages A,B,C,D to client (2) Client acks message A and B (3) Connection failure occurs while ack B is being delivered to broker (4) Connection is 'recovered' (4.1) If the clients previous connection is still connected to the broker (client reconnect quicker than broker can detect client failure), then the broker forcibly disconnects the previous connection. This cause all previous subscriptions to be destroyed. (4.2) Client replays all connection state including open subscriptions to the broker (4.3) Client resends the ack that was in flight when the failure occurred. (4.4) Since broker has not sent the new subscription any messages yet, it does not match anything sent to the client and we get the "Invalid acknowledgment" message. (4.5) Broker re-sends message B,C,D to client Now in the scenario above the worst case is that B is delivered 2 times. But since 4.5 and 4.4 occur concurrently there could be some subtle bugs in the code that need a closer look. Anyways.. I hope this help shed some light into the issue. On 11/10/06, Danielius Jurna wrote: > > No. I don't have network of brokers. And error log in the broker shows, that > client sends ack to correct broker, which cannot correlate ACK. It's very > easy to reproduce this bug. I've made a test case, which you can find in the > jira issue mentioned in the first message. > > > yaussy wrote: > > > > If you have a network of brokers, does this problem happen if the consumer > > fails over to another, running, broker? > > > > -- > View this message in context: http://www.nabble.com/Bug-in-failover-transport-tf2587218.html#a7271859 > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- Regards, Hiram Blog: http://hiramchirino.com