MCPcopy
hub / github.com/IBM/sarama / AddMessage

Method AddMessage

produce_request.go:296–306  ·  view source on GitHub ↗
(topic string, partition int32, msg *Message)

Source from the content-addressed store, hash-verified

294}
295
296func (r *ProduceRequest) AddMessage(topic string, partition int32, msg *Message) {
297 r.ensureRecords(topic, partition)
298 set := r.records[topic][partition].MsgSet
299
300 if set == nil {
301 set = new(MessageSet)
302 r.records[topic][partition] = newLegacyRecords(set)
303 }
304
305 set.addMessage(msg)
306}
307
308func (r *ProduceRequest) AddSet(topic string, partition int32, set *MessageSet) {
309 r.ensureRecords(topic, partition)

Callers 2

buildRequestMethod · 0.95

Calls 3

ensureRecordsMethod · 0.95
newLegacyRecordsFunction · 0.85
addMessageMethod · 0.80

Tested by 1