fix: change consumer group receive messages avoid kafka consumer group always rebalanced. (#1942)

This commit is contained in:
OpenIM-Gordon
2024-02-27 16:44:51 +08:00
committed by GitHub
parent 6c4334b730
commit 8e6c1d74c7
4 changed files with 10 additions and 20 deletions
+1 -6
View File
@@ -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)
}