Closed databasedav closed 5 months ago
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 https://github.com/nats-io/nats-server/pull/4217 , I will update rust client to have proper update method.
Hey. This has been released in v0.35.0. Closing the issue.
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, althoughnatscli
does (called withnats con edit ...
) and ends up calling theNewConsumerFromDefault
function and i'm not a good enough go reader to deduce the effects of what seems to be some sort of overwriting update/editProposed 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 clientsWho benefits from the change(s)?
those who want dynamic consumer configuration
Alternative Approaches
No response