-
Notifications
You must be signed in to change notification settings - Fork 139
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
[ADDED, BREAKING] Services: queue group now configurable and can be disabled #800
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #800 +/- ##
==========================================
+ Coverage 68.71% 70.55% +1.83%
==========================================
Files 39 47 +8
Lines 15207 15450 +243
Branches 3143 3181 +38
==========================================
+ Hits 10449 10900 +451
+ Misses 1700 1476 -224
- Partials 3058 3074 +16 ☔ View full report in Codecov by Sentry. |
Looking into the test failure, please hold off the review. |
It appears possible that the client exits before the (own) dispatcher thread finishes and quits. Waiting until the "Done" callback is invoked fixes it. Also, since a sub is (often? always?) freed from the own dispatcher thread, use natsThread_Detach rather than natsThread_Join when cleaning up own dispatcher.
{ | ||
nats_destroyQueuedMessages(&sub->ownDispatcher.queue); | ||
|
||
if (sub->ownDispatcher.thread != NULL) | ||
{ | ||
natsThread_Join(sub->ownDispatcher.thread); | ||
natsThread_Detach(sub->ownDispatcher.thread); |
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.
@kozlovic this was an oversight on my end in a prior commit, I think. This code can be executed in the dispatch thread itself, so "Join" wouldn't be right. Anyway, this restores the original logic. It did not appear to affect the test failure here, the wait in the test did.
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.
Little changes, but otherwise LGTM.
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
…up now configurable and can be disabled (#800)
Compliance with nats-io/nats-architecture-and-design#239 and nats-io/nats-architecture-and-design#300
One can now customize the queue group used for microservice endpoints, or disable its use.