disable message pool by default
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
5
kgo.go
5
kgo.go
@@ -478,11 +478,15 @@ func (b *Broker) fnSubscribe(ctx context.Context, topic string, handler interfac
|
||||
}
|
||||
}
|
||||
|
||||
var messagePool bool
|
||||
var fatalOnError bool
|
||||
if b.opts.Context != nil {
|
||||
if v, ok := b.opts.Context.Value(fatalOnErrorKey{}).(bool); ok && v {
|
||||
fatalOnError = v
|
||||
}
|
||||
if v, ok := b.opts.Context.Value(subscribeMessagePoolKey{}).(bool); ok && v {
|
||||
messagePool = v
|
||||
}
|
||||
}
|
||||
|
||||
if options.Context != nil {
|
||||
@@ -500,6 +504,7 @@ func (b *Broker) fnSubscribe(ctx context.Context, topic string, handler interfac
|
||||
done: make(chan struct{}),
|
||||
fatalOnError: fatalOnError,
|
||||
connected: b.connected,
|
||||
messagePool: messagePool,
|
||||
}
|
||||
|
||||
kopts := append(b.kopts,
|
||||
|
Reference in New Issue
Block a user