mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 10:22:36 +08:00
sess == nil
This commit is contained in:
parent
04a9788bc0
commit
8c119a76d1
@ -397,9 +397,15 @@ func (OnlineHistoryConsumerHandler) Cleanup(_ sarama.ConsumerGroupSession) error
|
|||||||
|
|
||||||
func (och *OnlineHistoryConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession,
|
func (och *OnlineHistoryConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupSession,
|
||||||
claim sarama.ConsumerGroupClaim) error { // a instance in the consumer group
|
claim sarama.ConsumerGroupClaim) error { // a instance in the consumer group
|
||||||
|
for {
|
||||||
if sess == nil {
|
if sess == nil {
|
||||||
|
log.NewWarn("", " sess == nil, waiting ")
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
|
} else {
|
||||||
|
break
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.NewDebug("", "online new session msg come", claim.HighWaterMarkOffset(), claim.Topic(), claim.Partition())
|
log.NewDebug("", "online new session msg come", claim.HighWaterMarkOffset(), claim.Topic(), claim.Partition())
|
||||||
cMsg := make([]*sarama.ConsumerMessage, 0, 1000)
|
cMsg := make([]*sarama.ConsumerMessage, 0, 1000)
|
||||||
t := time.NewTicker(time.Duration(100) * time.Millisecond)
|
t := time.NewTicker(time.Duration(100) * time.Millisecond)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user