Skip to content

bugfix #135 handle draining messages after unsubscribe#144

Open
jmglsn wants to merge 1 commit into
masterfrom
bugfix/135-handle-draining-messages
Open

bugfix #135 handle draining messages after unsubscribe#144
jmglsn wants to merge 1 commit into
masterfrom
bugfix/135-handle-draining-messages

Conversation

@jmglsn

@jmglsn jmglsn commented Jun 15, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown
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

@igortyulkin

Copy link
Copy Markdown

@jmglsn hi! Will you close the merge conflicts ?

@jmglsn

jmglsn commented Mar 21, 2025

Copy link
Copy Markdown
Member Author

@jmglsn hi! Will you close the merge conflicts ?

Hi @igortyulkin,

I would like to promise this, but to be honest I barley got any time for the project over the last years.

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.

3 participants