Discussion:
[openjms-developer] [ openjms-Bugs-1192265 ] Message Lost in multi-processor envirement
SourceForge.net
2005-09-21 07:49:18 UTC
Permalink
Bugs item #1192265, was opened at 2005-04-29 08:22
Message generated for change (Settings changed) made by shyan
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1192265&group_id=54559

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: server
Group: v0.7.6.1
Status: Open
Resolution: None
Priority: 7
Submitted By: shyan (shyan)
Assigned to: Tim Anderson (tanderson)
Summary: Message Lost in multi-processor envirement

Initial Comment:
I found message lost sometime in multi-processor
envirement.
I test and simulate this situation and get the following
result.

Sometime messages get the same sequenceNumber.

so message handle have same sequenceNumber in
PMDVector and persistent storage(DB).
When cunsumer receive message,the message handle
removed from PMDVector.

Because MessageHandleComparator only compare
three attributes
(priority,acceptedtime,sequencedNumber) ,so if the
three attributes equal,the handle is equal.

Two elements(or more) is removed from PMDVector.

So some messages lost,but thoses message still exists
in database.

You can send two messages to server,and shutdown
server.
Then modify two record's acceptedtime and
sequenceedNumber to same value.
Start server and receive all message,you can only get
one message,and the lost message is still exist in db.

I have a solution to fix this problem.
Add messageid conditition in
MessageHandleComparator.compare method to avoid
compare confuse,because messageid is always unique.

The attache file is my patch.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1192265&group_id=54559
Loading...