[
https://issues.jboss.org/browse/JBMESSAGING-1889?page=com.atlassian.jira....
]
Yong Hao Gao commented on JBMESSAGING-1889:
-------------------------------------------
The problem is that the ConnectionConsumer uses an internal non-transactional session to
receive messages and then the messages were dispatched to server sessions, which can be a
transactional session. However the commit of transaction is done through the internal
session. During failover, JBM will recover messages that not acked/committed, but as the
acks list goes with the internal session, which is non tx one, so JBM won't get the
correct ACK list. The result is that the message that has been delivered won't get
correctly processed at the server side, therefore the message will be delivered again.
Duplicate messages are produced during cluster failover when a
cluster node is shutdown
---------------------------------------------------------------------------------------
Key: JBMESSAGING-1889
URL:
https://issues.jboss.org/browse/JBMESSAGING-1889
Project: JBoss Messaging
Issue Type: Bug
Components: Messaging Core
Affects Versions: 1.4.8.SP1
Environment: JBoss EAP 5.1.1
Reporter: Tom Ross
Assignee: Yong Hao Gao
Attachments: DistributedQueueExample.java
The scenarion describes a set-up consisting of JBoss cluster and a stand alone JBoss
instance hosting a MDB.
During the test the master node of the JBoss cluster is shutdown using CTRL/C or
shutdown.sh script.
The following is a description of the events that hava happened that lead to duplicate
messages.
- Message is delivered to a MDB from node-1 of the cluster to a MDB in a transaction. The
transaction prepare has failed because the server peer of node-1 is shutting down.
- Message is rolled back and received again in another transaction. This happens at the
client side only. Then the transaction is committed on node-2 as the client has failed
over to node-2 of the cluster.
- Meanwhile the fact that node-1 is shutting down causes server side failover to happen
and the message is failed over to node-2.
- node-2 redelivers the message to the MDB in a separate transaction and committs.
So the message is received twice.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira