-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JMS: Tombstone the message handling on abort (#904) #905
Conversation
What JMS broker do you use for testing? We could run a Docker image with a JMS broker instead of the embedded ActiveMQ. |
Unfortunately, it is a highly customized version of ActiveMQ on both client and broker. Not something I can make available. In debugging this issue, we need to determine whether it is the bug in that infrastructure or on the Alpakka implementation. Looks like I have to go by reasoning on this one. |
What it turns out to be is that the session stop is not stopping the session immediately in our client, but after a few message cycles. The message held by the session at the time (based on the current code) is rolled back, but as the message handling did not stop, the next message is delivered downstream. The downstream still holds the This is the reason for the proposed change. Once we abort, we ensure no more messages are handled, neither commit nor rollback. This is achieved by the tombstone. Also we want to make sure we always commit on the right message. So we pass the envelope down to be checked against the current message envelope to provide that level of validation. The only way we can try and see whether we can recreate is to move back to an older version of the ActiveMQ broker AND client library (yes, what we're using is based on a pretty old version) and see whether we can reproduce. Not 100% sure, though. |
Ok, I understand the problem you're solving now. |
Sure. Let me add these comments in the code to make it clear. Thanks! |
…n commit/rollback (fixes akka#904)
d4a6cf7
to
6ef2b11
Compare
Just updated the code to make the envelope validation using |
Build is failing for unrelated issues. Unfortunately, I can't restart the build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
... and validate the TxEnvelope on commit/rollback - hopefully at no or very minimal performance impact.
Unfortunately, cannot recreate issue on unit-test broker. Can consistently recreate issue on same 'abort message loss' test with our internal broker.