activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Bain <>
Subject Re: Duplicate Messages in the Message Store
Date Tue, 18 Apr 2017 04:34:01 GMT
Based on the doGetLastMessageStoreSequenceId() method in,
if all messages have been consumed, acked, and deleted, the ID 0 will be
computed as the max value in the store, so I believe that the next ID used
will be 1.  But I'm not sure that that information helps you investigate
the behavior you're seeing during a failover event.

Are you able to reproduce this behavior reliably, in a minimal test
configuration?  The smoothest path forward would be for you to find a way
to reliably reproduce it and then submit a JIRA entry with the full details
of how to reproduce the problem, so that someone else could figure out
what's going on and address any bug that turns out to be the root cause of
the behavior.


On Fri, Apr 14, 2017 at 1:51 AM, srivmeka <> wrote:

> Hi,
> Am facing issue with broker trying to insert duplicate message into
> activemq_msgs.
> This was observed during
> 1) Broker fail over
> 2) Data center/Application fail over where the primary broker changes per
> data center, note there is no broker shutdown here.
> I am using JDBC persistent Adapter and
> <broker brokerName="partner-broker"
> xmlns="">
>                 <persistenceAdapter>
>                         <jdbcPersistenceAdapter
> dataSource="#amq-dataSource"
> useDatabaseLock="false"/>
>                 </persistenceAdapter>
>                 <transportConnectors>
>                         <transportConnector name="openwire1"
> uri="tcp://${activemq.broker1.hostname}:${activemq.broker1.
> portId}?maximumConnections=1000"/>
>                 </transportConnectors>
>         </broker>
> I have difficulty in understanding how broker inserts messages into message
> queues.
> The code in activemq jar does explain that it gets the max(ID) for next
> sequence generator but when is this really happening? Is there any caching
> mechanism here? What is the message is already consumed and deleted, how
> can
> it get the MAX(ID)?
> Thanks,
> Sri
> --
> View this message in context: http://activemq.2283324.n4.
> Sent from the ActiveMQ - User mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message