Lack of subject update Changing nats filter subjects
dpalat opened this issue · comments
Problem description
Hello team, I am having a issue trying to update the subject of a consumer with nack, so the issue is related with the change of one subject to a multiple subjects filter and also when I want to add another simple subject filter into the array of subjects.
The only way to apply the changes is deleting the consumer and then restarting nack so it is reacreating the consumer with the correct subject.
Any idea or plan to fix this issue? do you have a better workaround than delete the consumer and restart the nack pod?
Nack logs: E1102 10:34:19.371115 1 controller.go:460] failed to process consumer: failed to update consumer "workload" on stream "MAIN": consumer subject filters cannot overlap (10138)
What version amI using?
nack version: natsio/jetstream-controller:0.13.0
nats version: 2.10.3
yml version: jetstream.nats.io/v1beta2
Is this defect reproducible?
I think yes
Given the capability you are leveraging, describe your expectation?
a kick fix and final fix in the next version of nack
The steps I've used (these are even worse, so your steps would be much better though still not great!):
- Delete the consumer in NATS itself
kubectl delete consumers.jetstream.nats.io <consumername>
kubectl apply
@lukaso thanks for the reply, the deletion of the consumer works fine but very difficult to do that when you consumer is running in productions with a lot of traffic, instead of that as a Workaround you can edit the subject consumer using the command with the Nats cli anyways also there is a bug trying to use the Nats cli with the Args, but you can do the workaround using consumer edit with json configuration, look the this issue in the Cli repo for more details nats-io/natscli#918
The steps I've used (these are even worse, so your steps would be much better though still not great!):
- Delete the consumer in NATS itself
kubectl delete consumers.jetstream.nats.io <consumername>
kubectl apply
@lukaso thanks for the reply, the deletion of the consumer works fine but very difficult to do that when you consumer is running in productions with a lot of traffic, instead of that as a Workaround you can edit the subject consumer using the command with the Nats cli anyways also there is a bug trying to use the Nats cli with the Args, but you can do using consumer edit with json configuration, look the this issue in the Cli repo for more details nats-io/natscli#918
Hey.
Thanks for reporting the issue.
I'm looking into it.
I found a bug in jsm
and issued a fix.
Hello, any more updates on this? I believe jsm needs a new release and then nack needs to reference that new version. Is there anything more?
No. It's just that. Do we have a schedule for releasing jsm
@ripienaar ?
Not a schedule as such but there will be a release before mid jan
Not a schedule as such but there will be a release before mid jan
Is a fix comming? We just ran into the issue...
I just ran into this as well. Anything I can do to help?
Looks like a jsm release hasn't been cut yet.
+1 on running into this issue. We also will be deleting and recreating the consumer, but as others have mentioned it is a less than ideal process in production environments.
Here's a gist I'm using to work around this problem. Remember this is code that works for me but no warranty (since it is mutating your system). https://gist.github.com/lukaso/347c8d9afdc6b21ce8fbd15456594480
Can we get the latest ESM release out?
Created this PR to fix this issue: #170