Bug 1022057 - Getting duplicates on JMS Bridge when AT_MOST_ONCE quality-of-service is used
Getting duplicates on JMS Bridge when AT_MOST_ONCE quality-of-service is used
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ER7
: ---
Assigned To: Clebert Suconic
Miroslav Novak
Russell Dickenson
Depends On: 1022770
  Show dependency treegraph
Reported: 2013-10-22 10:58 EDT by Miroslav Novak
Modified: 2013-12-15 11:17 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-15 11:17:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
reproducer.zip (197.34 KB, application/zip)
2013-10-22 10:58 EDT, Miroslav Novak
no flags Details

  None (edit)
Description Miroslav Novak 2013-10-22 10:58:19 EDT
Created attachment 815027 [details]

There are duplicated messages with JMS bridges when AT_MOST_ONCE quality-of-service is used.

Test scenario:
1. Start EAP 6.2.0.ER6 server
   - queue OutQueue is deployed to this server
2. Start two EAP 6.2.0.ER6 servers configured as live/backup pair in dedicated topology with shared store
  - queue InQueue is deployed on both of the servers
  - JMS bridge is deployed on both of the server - bridge sends messages from InQueue from to OutQueue to remote server started in step 1. and has AT_MOST_ONCE quality-of-service
3. Start producer which sends 1000 messages to InQueue to live
4. Kill/Shutdown live server
5. Start producer which sends 1000 messages to InQueue to backup
6. Start consumer which receives messages from OutQueue 

Receiver gets 3000 messages.

How to use reproducer.zip - following commands run in reproducer directory:
0. Under root create IP aliases ( to your public interface:
 - "ifconfig eth1:0 up;ifconfig eth1:1 up;ifconfig eth1:2 up;"
1. "sh prepare.sh"
   - prepares servers in server{1..3} directories

2. Start servers:
   "sh start-server3" - target server for the JMS bridge
   "sh start-server1" - live server with JMS bridge
   "sh start-server2" - backup server with JMS bridge

3. Start producer - "sh start-producer.sh jms/queue/InQueue 1000"
4. Kill/Shutdown "live" - server with ip
5. Start producer - "sh start-producer.sh jms/queue/InQueue 1000"
6. Start consumer - "sh start-consumer.sh jms/queue/OutQueue"
Comment 1 Clebert Suconic 2013-10-22 12:48:22 EDT
AT-MOST-ONCE means AT *LEAST* ONCE in British English.

at_most_once can accept duplicates as documented.. so this is not a bug... 

if you need exactly once you have to use XA.
Comment 2 Clebert Suconic 2013-10-22 12:48:55 EDT
Not a bug.. I will let this open for a day before we close it as NOT-A-ABUG
Comment 3 Clebert Suconic 2013-10-22 13:37:14 EDT
ahh... no failure in place? 
I thought it was sending duplicates in case of a failure.

on that case this is a blocker and needs to be fixed
Comment 4 Clebert Suconic 2013-10-22 13:37:54 EDT
I don't have privileges to make it a blocker... can someone do so...

We are fixing it.
Comment 5 Justin Bertram 2013-10-22 17:11:41 EDT
A similar issue (i.e. https://issues.jboss.org/browse/HORNETQ-1236) was fixed a few releases ago, but I see now that it only resolved the issue when <max-batch-size> for the JMS bridge was 1.  However, your example used a <max-batch-size> of 10 so the problem came back.  The issue should now be fixed courtesy of:

Comment 6 Miroslav Novak 2013-10-23 03:35:12 EDT
Based on feedback above I'm resetting dev_ack to ?.
Comment 7 Miroslav Novak 2013-10-23 03:40:59 EDT
Can you set dev_ack to +.
Comment 9 Clebert Suconic 2013-10-24 11:43:19 EDT
modified per BZ-1022770
Comment 10 Martin Svehla 2013-10-31 09:57:36 EDT
Verified with linked reproducer on 6.2.0.ER7 / 2.3.10. Good job guys

Note You need to log in before you can comment on or make changes to this bug.