From d43b59f2f38859b2513dab80cd0ac6b70fa47e01 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sun, 18 May 2025 18:58:53 +0300 Subject: [PATCH] disable message pool by default Signed-off-by: Vasiliy Tolstov --- options.go | 7 +++++++ subscriber.go | 1 + 2 files changed, 8 insertions(+) diff --git a/options.go b/options.go index 4f7eae3..b7f8d98 100644 --- a/options.go +++ b/options.go @@ -116,3 +116,10 @@ type subscribeMessagePoolKey struct{} func SubscribeMessagePool(b bool) broker.SubscribeOption { return broker.SetSubscribeOption(subscribeMessagePoolKey{}, b) } + +type subscribeMessagePoolKey struct{} + +// SubscribeMessagePool optionaly enabled/disable message pool +func SubscribeMessagePool(b bool) broker.SubscribeOption { + return broker.SetSubscribeOption(subscribeMessagePoolKey{}, b) +} diff --git a/subscriber.go b/subscriber.go index c61854a..e7557b8 100644 --- a/subscriber.go +++ b/subscriber.go @@ -39,6 +39,7 @@ type consumer struct { } type Subscriber struct { +<<<<<<< HEAD consumers map[tp]*consumer c *kgo.Client htracer *hookTracer