-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
JetStream additions #2432
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
JetStream additions #2432
Conversation
Signed-off-by: Derek Collison <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (at least the PushActive part)
Signed-off-by: Derek Collison <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Derek Collison <[email protected]>
@@ -69,6 +70,11 @@ type ConsumerConfig struct { | |||
Direct bool `json:"direct,omitempty"` | |||
} | |||
|
|||
type PushActive struct { | |||
Subject string `json:"subject"` | |||
Queue string `json:"queue,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but there could be multiple queue groups on the same subject - and some unqueued?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, once a consumer is bound to a queue group, meaning we know you want to do scale out on this consumer, its bound to that queue group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, 2 nats clients can have queue groups on this subject, 2 different queue groups. And there could also be subscribes on it that has no queue group - while others does.
You specifically take only the first, but thats just not deterministic at all because if there are 2 clients each with its own queue group one server will report them one way and another another way depending on how and when splits happened.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just like two apps having different delivery subjects (e.g. _INBOX.>) only one is bound to the server side consumer. This is similar in that only one queue group should be bound to the delivery subject for scale out binding to a single consumer.
If someone binds that shouldn't, the app that should be bound will fail to bind with a queue mismatch error.
mset.pubAck = []byte(fmt.Sprintf("{%q:%q, %q:%q, %q:", "stream", cfg.Name, "domain", domain, "seq")) | ||
} else { | ||
mset.pubAck = []byte(fmt.Sprintf("{%q:%q, %q:", "stream", cfg.Name, "seq")) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this pubacks are broken.
I am seeing acks like:
{"stream":"GOVERNOR_TEST", "seq":10
no closing }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am looking at a race at the moment in that section, will have PR shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds two items.
Signed-off-by: Derek Collison [email protected]
/cc @nats-io/core