-
Notifications
You must be signed in to change notification settings - Fork 673
SMQ-3097 - Add NATs throttling in messaging #3074
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
base: main
Are you sure you want to change the base?
Conversation
6865970 to
c1c2d86
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3074 +/- ##
===========================================
+ Coverage 35.47% 47.41% +11.93%
===========================================
Files 319 52 -267
Lines 48061 3109 -44952
===========================================
- Hits 17052 1474 -15578
+ Misses 30154 1538 -28616
+ Partials 855 97 -758 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pkg/messaging/nats/options.go
Outdated
| slowConsumerConfig: &SlowConsumerConfig{ | ||
| MaxPendingMsgs: defaultMaxPendingMsgs, | ||
| MaxPendingBytes: defaultMaxPendingBytes, | ||
| EnableDroppedMsgTracking: defaultEnableDroppedMsgTracking, | ||
| EnableSlowConsumerDetection: defaultEnableSlowConsumerDetection, |
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.
Can we move this to the jsStreamConfig?
pkg/messaging/nats/pubsub.go
Outdated
| // checkConsumerLag checks the consumer lag and logs warnings if thresholds are exceeded. | ||
| // This provides additional slow consumer detection for JetStream consumers. | ||
| func (ps *pubsub) checkConsumerLag(ctx context.Context, consumerName string) { | ||
| if ps.slowConsumerConfig == nil || !ps.slowConsumerConfig.EnableSlowConsumerDetection { | ||
| return | ||
| } | ||
|
|
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.
Is this needed at all? Isn't natsErrorHandler going to handle these scenarios anyway?
a8a732b to
b79a933
Compare
b79a933 to
b8e6999
Compare
b8e6999 to
a6dfaa6
Compare
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
a6dfaa6 to
0f6df07
Compare
What type of PR is this?
What does this do?
Which issue(s) does this PR fix/relate to?
Have you included tests for your changes?
Did you document any new/modified feature?
Notes