mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
test
This commit is contained in:
parent
eb7ff77461
commit
3bc2e97e8b
@ -103,18 +103,23 @@ func (mc *OfflineHistoryConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupS
|
|||||||
// log.NewDebug("", "kafka get info to delay mongo", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "offline")
|
// log.NewDebug("", "kafka get info to delay mongo", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "offline")
|
||||||
// //mc.msgHandle[msg.Topic](msg.Value, string(msg.Key))
|
// //mc.msgHandle[msg.Topic](msg.Value, string(msg.Key))
|
||||||
//}
|
//}
|
||||||
|
cmd := Cmd2Value{}
|
||||||
|
repeat:
|
||||||
select {
|
select {
|
||||||
case cmd := <-mc.cmdCh:
|
case cmd = <-mc.cmdCh:
|
||||||
if cmd.Cmd == OnlineTopicVacancy {
|
case <-time.After(time.Millisecond * time.Duration(1)):
|
||||||
for msg := range claim.Messages() {
|
goto repeat
|
||||||
if GetOnlineTopicStatus() == OnlineTopicVacancy {
|
}
|
||||||
log.NewDebug("", "kafka get info to mongo", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value))
|
if cmd.Cmd == OnlineTopicVacancy {
|
||||||
mc.msgHandle[msg.Topic](msg.Value, string(msg.Key))
|
for msg := range claim.Messages() {
|
||||||
sess.MarkMessage(msg, "")
|
if GetOnlineTopicStatus() == OnlineTopicVacancy {
|
||||||
}
|
log.NewDebug("", "kafka get info to mongo", "msgTopic", msg.Topic, "msgPartition", msg.Partition, "msg", string(msg.Value))
|
||||||
|
mc.msgHandle[msg.Topic](msg.Value, string(msg.Key))
|
||||||
|
sess.MarkMessage(msg, "")
|
||||||
|
} else {
|
||||||
|
goto repeat
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user