@@ -29,11 +29,10 @@ var (
2929)
3030
3131const (
32- msgPrefix = "m"
33- defaultMaxPendingMsgs = 1000
34- defaultMaxPendingBytes = 5 * 1024 * 1024
35- defaultEnableDroppedMsgTracking = true
36- defaultEnableSlowConsumerDetection = true
32+ msgPrefix = "m"
33+ defaultMaxPendingMsgs = 1000
34+ defaultMaxPendingBytes = 5 * 1024 * 1024
35+ defaultEnableDroppedMsgTracking = true
3736)
3837
3938type options struct {
@@ -45,7 +44,6 @@ type options struct {
4544type SlowConsumerConfig struct {
4645 // MaxPendingMsgs maps to JetStream ConsumerConfig.MaxAckPending
4746 // Controls the maximum number of outstanding unacknowledged messages
48- // Also used for slow consumer detection at 70% of this value
4947 MaxPendingMsgs int
5048
5149 // MaxPendingBytes maps to JetStream ConsumerConfig.MaxRequestMaxBytes
@@ -55,21 +53,16 @@ type SlowConsumerConfig struct {
5553 // EnableDroppedMsgTracking enables logging of message redeliveries
5654 // which can indicate slow consumer behavior in JetStream
5755 EnableDroppedMsgTracking bool
58-
59- // EnableSlowConsumerDetection enables automatic slow consumer detection
60- // and logging when consumer lag exceeds 70% of MaxPendingMsgs
61- EnableSlowConsumerDetection bool
6256}
6357
6458func defaultOptions () options {
6559 return options {
6660 prefix : msgPrefix ,
6761 jsStreamConfig : jsStreamConfig ,
6862 slowConsumerConfig : & SlowConsumerConfig {
69- MaxPendingMsgs : defaultMaxPendingMsgs ,
70- MaxPendingBytes : defaultMaxPendingBytes ,
71- EnableDroppedMsgTracking : defaultEnableDroppedMsgTracking ,
72- EnableSlowConsumerDetection : defaultEnableSlowConsumerDetection ,
63+ MaxPendingMsgs : defaultMaxPendingMsgs ,
64+ MaxPendingBytes : defaultMaxPendingBytes ,
65+ EnableDroppedMsgTracking : defaultEnableDroppedMsgTracking ,
7366 },
7467 }
7568}
0 commit comments