-
Notifications
You must be signed in to change notification settings - Fork 14
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
[suggestion] [nats-streaming] Expose durable connection parameter #60
Comments
What would you currently expect to happen if passing an empty queue group? Do you think we can make these changes without breaking compatibility with current users? If so, PR welcome. |
I support this suggestion 100%. I would currently like to use the 2nd scenario, but I cannot. I would just change the 1st scenario to not set any default value for durable, as the behaviour might then be confusing. If somebody wants to use durable, they will have to explicitly set it. |
If there's no objections to this going in I'll prepare a patch shortly @mjgarton @SpeedyCoder |
I would maybe consider using queue group as the durable name in case the durable name is not set to match the behaviour of the current implementation. We can alternatively return an error in that case in order to force users to specify the durable name... Overall I would prefer things to error rather than using a default name like substrate... |
My point of view is that the best thing to do is to mirror the underlying implementation. So if a durable name is not specified you get a non durable queue subscription. From a users point of view I think this is the least surprising. |
If one passes an empty queue-group parameter then the client creates that subscription as a non durable. This is surprising behavior. Rather than trying to hide the underlying subscription model, it should be possible for a user to specify exactly what they want.
I suggest exposing the durable parameter as a configuration option. The matrix of these options would then look like this:
durable not set, and queue group set
queue subscription with durable name "substrate" and configured queue name
durable set and queue group not set
regular (non queuegroup) subscription with configured durable name
neither durable nor queue group set
regular (non durable, non queue group) subscription, with warning that this is a non permanent subscription
The text was updated successfully, but these errors were encountered: