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
Creating a subscription with a consumer config change against an existing consumer #53
Comments
Consumers cannot be updated. The only property that’s mutable is the deliver subject. |
That should probably rule out option 2. |
Iirc the server treats consumer updates as idempotent. So if a update happens that isn’t identical (other than subject) it would cause an error. Essentially we have 3 now. I need to double check this is from memory how it works |
Remember that the library will more often do a lookup first. So the issue that @scottf you are reporting is likely that the "subscribe" call does not match what the consumer config is already is, and you should be testing that what config is passed (when it is passed, that's the key) to the "subscribe" call matches what is found in the consumer config object returned by the lookup. Some background: nats-io/nats.go#803 |
@kozlovic Yes, this is the "subscribe" call does not match the existing consumer.
|
My order of preference is 4, 3, 1. 4 would essentially prefer (but not require) that durable consumers should be made ahead of time, before subscriptions, which seems like a reasonable idea. |
Now that a handful consumer options can be updated, I presume it is safer/simpler to have the server reject the update? |
This will be addressed with JS Simplification - this is the problem JS Simpl will fix. |
Overview
Based on conversation, the expectation is choice #4
Reject any attempt to create a subscription against an existing durable unless the subscription is a bind subscription or the provided consumer config matches exactly.
Clients and Tools
Other Tasks
Implemented
Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.
Issue History
Currently when creating a subscription in the Java and .NET client, if a user offers a consumer configuration change against an existing consumer, that change is ignored and there is no attempt to update the consumer.
Is this the desired behavior when the offered config does not match the config from the server? Some options include:
The text was updated successfully, but these errors were encountered: