mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
redis add get message
This commit is contained in:
parent
c66ccfeda2
commit
36b5315075
@ -416,7 +416,7 @@ func (och *OnlineHistoryConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupS
|
||||
select {
|
||||
case msg := <-claim.Messages():
|
||||
triggerID = utils.OperationIDGenerator()
|
||||
if msg != nil {
|
||||
|
||||
log.NewDebug(triggerID, "claim.Messages ", msg)
|
||||
cMsg = append(cMsg, msg)
|
||||
if len(cMsg) >= 1000 {
|
||||
@ -431,9 +431,6 @@ func (och *OnlineHistoryConsumerHandler) ConsumeClaim(sess sarama.ConsumerGroupS
|
||||
cMsg = make([]*sarama.ConsumerMessage, 0, 1000)
|
||||
log.Debug(triggerID, "length trigger msg consumer end", len(cMsg))
|
||||
}
|
||||
} else {
|
||||
log.NewWarn(triggerID, "msg is nil")
|
||||
}
|
||||
|
||||
case <-t.C:
|
||||
if len(cMsg) > 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user