Return-Path: Delivered-To: apmail-activemq-users-archive@www.apache.org Received: (qmail 63152 invoked from network); 21 Feb 2008 00:32:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Feb 2008 00:32:40 -0000 Received: (qmail 9241 invoked by uid 500); 21 Feb 2008 00:32:35 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 9211 invoked by uid 500); 21 Feb 2008 00:32:34 -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 9202 invoked by uid 99); 21 Feb 2008 00:32:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Feb 2008 16:32:34 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [203.217.22.128] (HELO web1.nuix.com.au) (203.217.22.128) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2008 00:31:47 +0000 Received: from [192.168.222.61] (unknown [192.168.222.61]) by web1.nuix.com.au (Postfix) with ESMTP id 9DE231DF101 for ; Thu, 21 Feb 2008 11:31:16 +1100 (EST) Message-ID: <47BCC69E.5070104@nuix.com> Date: Thu, 21 Feb 2008 11:32:30 +1100 From: David Sitsky Organization: NUIX Pty Ltd User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: users@activemq.apache.org Subject: Re: Duplicate messages sent to Queue after broker restarts References: <15598179.post@talk.nabble.com> In-Reply-To: <15598179.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org ryarger wrote: > I am running the 5.1 SNAPSHOT from 2/19 (have also used 2/12) and I am > noticing that messages are being resubmitted to queues after a broker > restart. > I have tried persisting to both the AMQ Store and to SQL Server. The issue > occurs for both. > I am using Spring's DefaultMessageListenerContainer for the consumer and it > is configured for auto acknowledgment and session transaction is true. > > Messages are sent to the queue and processed by the message driven consumer. > I have confirmed that the consumer has completed processing with no > exceptions. > I then stop and start the broker and the messages that were just processed > are sent again. > > At first I suspected that I had something misconfigured, but the exact same > code works fine with AMQ 5.0.0. If you have session transactions as true - are you calling commit() after you have successfully processed the message (or does DefaultMessageListenerContainer do that for you)? Before you shutdown the broker, connect to it with jconsole and inspect the queue to see if there are still messages present. On my system I use the following command, so you'll need to update the paths appropriately: "c:\Program Files (x86)\Java\jdk1.6.0_02\bin\jconsole" service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi Trying calling session.commit() explicitly to see if it makes any difference. -- Cheers, David Nuix Pty Ltd Suite 79, 89 Jones St, Ultimo NSW 2007, Australia Ph: +61 2 9280 0699 Web: http://www.nuix.com Fax: +61 2 9212 6902