activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sitsky <>
Subject Re: Duplicate messages sent to Queue after broker restarts
Date Thu, 21 Feb 2008 00:32:30 GMT
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" 

Trying calling session.commit() explicitly to see if it makes any 


Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web:                            Fax: +61 2 9212 6902

View raw message