Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 13886 invoked from network); 8 Jan 2010 00:09:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Jan 2010 00:09:43 -0000 Received: (qmail 60996 invoked by uid 500); 8 Jan 2010 00:09:43 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 60936 invoked by uid 500); 8 Jan 2010 00:09:43 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 60924 invoked by uid 99); 8 Jan 2010 00:09:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jan 2010 00:09:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jan 2010 00:09:41 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 31959234C052 for ; Thu, 7 Jan 2010 16:09:20 -0800 (PST) Message-ID: <1605527899.4011262909360195.JavaMail.jira@brutus.apache.org> Date: Fri, 8 Jan 2010 00:09:20 +0000 (UTC) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Created: (AMQ-2560) Failover reconnect with outstanding consumer transaction can result in javax.jms.JMSException: Unmatched acknowledege: MessageAck and lost ack MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org Failover reconnect with outstanding consumer transaction can result in javax.jms.JMSException: Unmatched acknowledege: MessageAck and lost ack ---------------------------------------------------------------------------------------------------------------------------------------------- Key: AMQ-2560 URL: https://issues.apache.org/activemq/browse/AMQ-2560 Project: ActiveMQ Issue Type: Bug Components: Broker Affects Versions: 5.3.0 Reporter: Gary Tully Assignee: Gary Tully Fix For: 5.3.1, 5.4.0 It is possible to loose an ack after failover if an outstanding consumer transaction (and ack) is in progress during failover. If due to ordering or timing, an unexpected message is replayed to the consumer on recovery it will delivered (and correctly not suppressed as a duplicate). This will be acked with the outstanding messages but the ack will result in an exception {code}javax.jms.JMSException: Unmatched acknowledege: MessageAck...{code} as the original message will not have been re-dispatched. Essentially the ack is lost at this stage. The message will stay dispatched/inflight til the consumer closes, at which point it can again be re-dispatched to another consumer. A broker restart will also see it re-dispatched. In the mean time, it can look orphaned for some time or will be visible in the jdbc store. It will also be visible via the inflight count on that consumer. Resolution: On a transport disconnect, a consumer should discard acked state along with delivered messages as the messages that are redelivered are not guaranteed to be the same. This was not being done for a transacted session. Replayed messages are more likely to be the same if the order of connection recovery is preserved, but this will not be sufficient. (the test case shows the problem because recovery order is dependent on hashmap order which is random when dealing with connection ids) This needs to be done for both consumers that use receive() or message listeners (that are handled through dispatch) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.