mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-17 07:19:02 +08:00
fix: change consumer group receive messages avoid kafka consumer group always rebalanced. (#1942)
This commit is contained in:
@@ -16,8 +16,6 @@ package push
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/OpenIMSDK/tools/log"
|
||||
)
|
||||
|
||||
type Consumer struct {
|
||||
@@ -36,9 +34,6 @@ func NewConsumer(pusher *Pusher) (*Consumer, error) {
|
||||
}
|
||||
|
||||
func (c *Consumer) Start() {
|
||||
onError := func(ctx context.Context, err error, errInfo string) {
|
||||
log.ZWarn(ctx, errInfo, err)
|
||||
}
|
||||
go c.pushCh.pushConsumerGroup.RegisterHandleAndConsumer(context.Background(), &c.pushCh, onError)
|
||||
go c.pushCh.pushConsumerGroup.RegisterHandleAndConsumer(context.Background(), &c.pushCh)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user