add ExposeLag option, to be able to disable lag exporting
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -14,7 +14,7 @@ var (
|
||||
DefaultCommitInterval = 5 * time.Second
|
||||
|
||||
// DefaultStatsInterval specifies how fast check consumer lag
|
||||
DefaultStatsInterval = 5 * time.Second
|
||||
DefaultStatsInterval = 30 * time.Second
|
||||
|
||||
// DefaultSubscribeMaxInflight specifies how much messages keep inflight
|
||||
DefaultSubscribeMaxInflight = 100
|
||||
@@ -116,3 +116,10 @@ type subscribeMessagePoolKey struct{}
|
||||
func SubscribeMessagePool(b bool) broker.SubscribeOption {
|
||||
return broker.SetSubscribeOption(subscribeMessagePoolKey{}, b)
|
||||
}
|
||||
|
||||
type exposeLagKey struct{}
|
||||
|
||||
// ExposeLag enabled subscriber lag via [meter.Meter]
|
||||
func ExposeLag(b bool) broker.Option {
|
||||
return broker.SetOption(exposeLagKey{}, b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user