Skip to content

[fix] Fix consumer doesn't clear incomingMessageQueue during seek#101

Merged
Demogorgon314 merged 1 commit into
apache:mainfrom
RobertIndie:fix-seek
Nov 2, 2022
Merged

[fix] Fix consumer doesn't clear incomingMessageQueue during seek#101
Demogorgon314 merged 1 commit into
apache:mainfrom
RobertIndie:fix-seek

Conversation

@RobertIndie
Copy link
Copy Markdown
Member

Motivation

Currently, the consumer will receive old messages after the seek operation. Because the consumer doesn't clear the incomingMessageQueue before reconnecting. Therefore the consumer will dispatch some old messages to the user after the seek operation.

This issue can be easily reproduced by advancing the process of creating consumers to before producing message in testSeekForMessageId.

Modifications

  • Clear the incomingMessageQueue after seeking complete.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is already covered by existing tests, such as testSeekForMessageId.

Documentation

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

@RobertIndie RobertIndie self-assigned this Nov 2, 2022
@RobertIndie RobertIndie marked this pull request as ready for review November 2, 2022 09:08
@RobertIndie RobertIndie added the bug Something isn't working label Nov 2, 2022
@RobertIndie RobertIndie added this to the 3.1.0 milestone Nov 2, 2022
@Demogorgon314 Demogorgon314 merged commit 94b909e into apache:main Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants