Skip to content
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

bugfix #135 handle draining messages after unsubscribe #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmglsn
Copy link
Member

@jmglsn jmglsn commented Jun 15, 2020

When clients use auto ack and unsubscribe it's possible that messages are considered as processed, while they have never been forwarded by read.
In order to avoid accidental message los a DrainingConsumer state was added, that comes together with the DrainingMessageException.
Access to Parser internal buffer has been simplified, by adding isBufferEmpty.
Same applies for Client here isBufferEmpty and flushBufferedFrames were added.

When clients use `auto ack` and `unsubscribe` it's possible that messages are considered as processed, while they have never been forwarded by `read`.
In order to avoid accidental message los a DrainingConsumer state was added, that comes together with the `DrainingMessageException`.
Access to `Parser` internal buffer has been simplified, by adding `isBufferEmpty`.
Same applies for `Client` here `isBufferEmpty` and `flushBufferedFrames` were added.
use Stomp\Transport\Frame;
use Stomp\Transport\Message;

class DrainingConsumerState extends StateTemplate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great to have a class-doc what this state represents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants