Skip to content

Commit f169d21

Browse files
committed
remove unused code
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
1 parent efaaa5c commit f169d21

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

pkg/messaging/nats/options.go

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ var (
2929
)
3030

3131
const (
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

3938
type options struct {
@@ -45,7 +44,6 @@ type options struct {
4544
type 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

6458
func 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

Comments
 (0)