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

Fix wrong initial settings of js ordered consumer #1633

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

olbabushkin
Copy link

Currently we lost initial settings of ordered consumer if there is OptStartSeq is present.
Just fixed wrong check initial request condition

Also it looks like we will lost initial settings on every consumer reset. The main problem as I see is that policy can be changed from DeliverLastPerSubjectPolicy to DeliverByStartSequencePolicy just by consumer reset. This is very unexpected behavior.
Also lost InactiveThreshold is a bit unpleasant too.

o.babushkin and others added 3 commits May 18, 2024 04:15
…me OptStartSeq is present.

Just fixed wrong check initial request condition
remove empty line
@Jarema
Copy link
Member

Jarema commented May 18, 2024

Hey!

Thank you for your PR and feedback!

We cannot use DeliverLastPerSubject policy on reset, as it would cause redeliveries of messages that were already delivered.

The ByStartSequence would works fine, however there is an edge case if reset happens before we get all initial last per subject messages. We need to think about that one.

Keep in mind thet DeliverPolicy is just the starting condition for the consumer, and the whole point of resetting consumer is to resume when we missed some message, at last know sequence.

Thank you for pointing out the issue with InactiveThreshold - you are right. We should definately persist the original one upon reset.

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

Successfully merging this pull request may close these issues.

None yet

2 participants