[jboss-jira] [JBoss JIRA] Commented: (JBMESSAGING-1889) Duplicate messages are produced during cluster failover when a cluster node is shutdown

Yong Hao Gao (JIRA) jira-events at lists.jboss.org
Mon Jul 25 07:24:23 EDT 2011


    [ https://issues.jboss.org/browse/JBMESSAGING-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616198#comment-12616198 ] 

Yong Hao Gao commented on JBMESSAGING-1889:
-------------------------------------------

To reproduce:

Set up a 2 node cluster (server peer id 1 and 2). 
Start up the cluster and run the attached test (it comes from jbm example distributed-queue. put it in the example and run 'ant' is a simple way to run it).
The tests creates a connection consumer and then send a message. The connection consumer receives the message in a fake XA transaction branch. Before it commits it will prompt you to kill node 1 and it waits for the failover and does the commit on the failed over connection.

You can see the message have received twice.



> 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

        


More information about the jboss-jira mailing list