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 Stream.update_consumer #987

Closed
databasedav opened this issue Jun 5, 2023 · 2 comments
Closed

add Stream.update_consumer #987

databasedav opened this issue Jun 5, 2023 · 2 comments
Labels
enhancement Enhancement to existing functionality

Comments

@databasedav
Copy link

Use case

updating consumers at runtime, useful for running consumer migrations

one thing i'm unsure of (i haven't been able to find any docs on updating consumers) is the broader effects of a consumer update, e.g. does the server need to be restarted for the changes to take effect? will the effects apply to existing consumer clients (e.g. a consumer configuration stored on client may be out of sync with the server, but the consumer operates with the updated configuration because the configuration contracts are entirely enforced by the server)?

i noticed that the python client also does not have an update_consumer method, although natscli does (called with nats con edit ...) and ends up calling the NewConsumerFromDefault function and i'm not a good enough go reader to deduce the effects of what seems to be some sort of overwriting update/edit

Proposed change

add a Stream.update_consumer method, ideally requiring minimal higher level intervention in a distributed environment, e.g. clients in separate processes communicating with the same consumer eventually synchronize with the updated consumer on server, without having to restart the server or restart all clients

Who benefits from the change(s)?

those who want dynamic consumer configuration

Alternative Approaches

No response

@databasedav databasedav added enhancement Enhancement to existing functionality needs triage labels Jun 5, 2023
@Jarema
Copy link
Member

Jarema commented Jun 11, 2023

Hey.

The mismatch between clients comes from the fact, that initially, JetStream didn't support updating consumers.
Currently, you can update consumer via calling create again.

When the new addition to the server will be merged nats-io/nats-server#4217 , I will update rust client to have proper update method.

@Jarema
Copy link
Member

Jarema commented May 23, 2024

Hey. This has been released in v0.35.0.
Closing the issue.

@Jarema Jarema closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants