activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin MacNaughton (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (AMQ-2439) KahaDB + Network of Brokers + Restart = Duplicate Messages that cannot be removed from the data store
Date Fri, 13 Nov 2009 01:17:52 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-2439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Colin MacNaughton reopened AMQ-2439:
------------------------------------

      Assignee: Colin MacNaughton  (was: Gary Tully)
    Regression: [Regression]

Seeing the exception below in a 2 broker cluster with this fix which is causing the cluster
network connection to be dropped. When an MessageDispatch that was sent async is sent through
the bridge, it is sent oneway over the transport and then acked back to the local broker in
the sending thread. The problem is that peer broker might concurrently be closing the subscription
during the send, and the resulting ack now generates an IllegalStateException when the subscription
isn't found. To fix, I'm adding tighter synchronization around subscription tear down to avoid
this case. (See attached patch)

{code}
22:19:55 [REMOTE] BROKER1: 22:19:55 WARN  AbstractRegion: Ack for non existent subscription,
ack:MessageAck {commandId = 8392, responseRequired = false, ackType = 4, 
consumerId = ID:nbcmacnaug1-3881-1257920362625-5:1:1:6, firstMessageId = null, lastMessageId
= ID:nbcmacnaug1-3919-1257920382750-1:14:1:1:1236, 
destination = queue://QUEUE-Profile-6, transactionId = null, messageCount = 1} 
22:19:55 [REMOTE] BROKER1: 22:19:55 WARN  Service: Async error occurred: java.lang.IllegalArgumentException:
The subscription does not exist: ID:nbcmacnaug1-3881-1257920362625-5:1:1:6 
22:19:55 [REMOTE] BROKER1: java.lang.IllegalArgumentException: The subscription does not exist:
ID:nbcmacnaug1-3881-1257920362625-5:1:1:6 
22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:363)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:470)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:449)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:297)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:175)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:109)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:112)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.network.DemandForwardingBridgeSupport.serviceLocalCommand(DemandForwardingBridgeSupport.java:708)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.network.DemandForwardingBridgeSupport$1.onCommand(DemandForwardingBridgeSupport.java:159)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:109)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:112)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1190)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:779)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.broker.TransportConnection.iterate(TransportConnection.java:815)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)

22:19:55 [REMOTE] BROKER1: 	at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)

22:19:55 [REMOTE] BROKER1: 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)

22:19:55 [REMOTE] BROKER1: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)

22:19:55 [REMOTE] BROKER1: 	at java.lang.Thread.run(Thread.java:595) 
{code}

> KahaDB + Network of Brokers + Restart = Duplicate Messages that cannot be removed from
the data store
> -----------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-2439
>                 URL: https://issues.apache.org/activemq/browse/AMQ-2439
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Message Store
>            Reporter: Hiram Chirino
>            Assignee: Colin MacNaughton
>             Fix For: 5.3.0
>
>         Attachments: amq2439-patch.diff
>
>
> Every time the broker is restarted, the same set of duplicate messages get redelivered
to consumers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message