Bug 742150 - MDB receives more messages when qpidd is killed and restarted
Summary: MDB receives more messages when qpidd is killed and restarted
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java
Version: 2.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Rajith Attapattu
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
: 742187 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-29 09:13 UTC by Jiri Sedlacek
Modified: 2015-08-02 23:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-12 12:02:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jiri Sedlacek 2011-09-29 09:13:43 UTC
Description of problem: When qpidd is killed and restarted while messages are received by MDB, MDB receives and stores more messages, that was sent.


Steps to Reproduce:
1. checkout https://svn.devel.redhat.com/repos/jboss-qa/mrg/tests/ha
2. fix annotation in
/mdb-ejb/src/main/java/org/jboss/test/mdb/MRGJCAMessageBean.java to point to
your MRG server
3. replace hibernate dialect in /mdb-ejb/src/main/resources/META-INF/persistence.xml (if you use another db then mysql51)
4. compile with mvn -DskipTests clean package
5. configure eap to use mysql51 db for defaultDS and defaultXADS (or another db with xa transactions support)
6. copy ha/mdb-test/target/ha-kill-mrg-test.ear to deploy directory of EAP 5.1.1
(profile production)
7. checkout https://svn.devel.redhat.com/repos/jboss-qa/mrg/qpid-java-jca
8. configure qpid-java-jca/qpid-jca-ds.xml to point to your MRG server and copy it with qpid-ra.rar to deploy directory of eap production profile
9. start mrg enabled to store messages through restart
10. Start EAP
11. Go to http://localhost:8080/servlet/mrgtest?op=send&count=1000 - this sends 1000 messages to queue, that is consumed by mdb
12. while the mdb receives messages, kill qpidd daemon and restart it, eap should reconnect. 
13. after all messages are processed, check number of messages in db by http://localhost:8080/servlet/mrgtest?op=get-count, in db will be more messages that it was sent.
  
Actual results:

Received more messages, that were sent.

Expected results:

To receive exact amount of messages (number, which was sent)

Comment 1 Weston M. Price 2011-10-13 13:01:02 UTC
From my analysis, I believe this is an issue with the JMS client issuing 'extra-credits' on redelivery. As such, I don't believe this will be fixed in time for the 2.0.4 release. Also, I am changing the component to qpid-java as this is a client issue and does not involve the adapter directly.

Comment 2 Weston M. Price 2011-10-13 13:14:30 UTC
*** Bug 742187 has been marked as a duplicate of this bug. ***

Comment 3 Weston M. Price 2013-03-12 12:02:10 UTC
This has been addressed in the latest release. I am closing this as a result.


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