mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-25 07:43:10 -06:00
Log all errors when sending multiple messages
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
This commit is contained in:
parent
253a709c72
commit
3e4c95128c
|
|
@ -102,7 +102,13 @@ func (r *Inputer) WriteOutputEvents(roomID string, updates []api.OutputEvent) er
|
||||||
Value: sarama.ByteEncoder(value),
|
Value: sarama.ByteEncoder(value),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return r.Producer.SendMessages(messages)
|
errs := r.Producer.SendMessages(messages)
|
||||||
|
if errs != nil {
|
||||||
|
for _, err := range errs.(sarama.ProducerErrors) {
|
||||||
|
log.WithError(err).WithField("message_bytes", err.Msg.Value.Length()).Error("Write to kafka failed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return errs
|
||||||
}
|
}
|
||||||
|
|
||||||
// InputRoomEvents implements api.RoomserverInternalAPI
|
// InputRoomEvents implements api.RoomserverInternalAPI
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue