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

Add note about recreating ordered consumer #161

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Sep 28, 2022

Ordered Consumers should be recreated when heartbeats are missed.

This behaviour was not implemented in all clients and should be, especially after switching ordered consumers to memory storage and R1 which makes them much easier to loose.

This was found out in Go client in nats-io/nats.go#1094

Ordered  Consumers should be recreated when heartbeats are missed.

This behaviour was not implemented in all clients and should be, especially after switching ordered consumers to memory storage and R1 which makes them much easier to loose.
@Jarema Jarema requested a review from scottf September 28, 2022 18:29
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf
Copy link
Collaborator

scottf commented Sep 29, 2022

I understand that mem_storage and num_replicas are optimizations, but are they needed for all ordered consumers or just KV? Are there cases (topology, etc.) where it's not appropriate to have these?
It also seems like we are making ordered consumer mean something else other than "just guarantee the order".
Maybe it's just a documentation issue? Maybe we should transition the name to something else like in the mode of simplification, make this a "managed" consumer?

@derekcollison
Copy link
Member

For ordered consumers, we guarantee delivery in order and the way we achieve that today is that when an error condition is hit we create a new low level consumer picking up from the last good sequence we received, so these low level consumers should have a very light footprint in the system since we do not rely on their state after the client encounters an error.

Copy link
Member

@aricart aricart left a comment

Choose a reason for hiding this comment

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

LGTM

@aricart aricart mentioned this pull request Sep 29, 2022
11 tasks
@Jarema Jarema merged commit 270f551 into main Sep 29, 2022
@scottf scottf deleted the Add-note-about-recreating-consumers branch September 29, 2022 15:32
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.

5 participants