MCPcopy
hub / github.com/segmentio/kafka-go / WriteCompressedMessages

Method WriteCompressedMessages

conn.go:1116–1119  ·  view source on GitHub ↗

WriteCompressedMessages writes a batch of messages to the connection's topic and partition, returning the number of bytes written. The write is an atomic operation, it either fully succeeds or fails. If the compression codec is not nil, the messages will be compressed.

(codec CompressionCodec, msgs ...Message)

Source from the content-addressed store, hash-verified

1114//
1115// If the compression codec is not nil, the messages will be compressed.
1116func (c *Conn) WriteCompressedMessages(codec CompressionCodec, msgs ...Message) (nbytes int, err error) {
1117 nbytes, _, _, _, err = c.writeCompressedMessages(codec, msgs...)
1118 return
1119}
1120
1121// WriteCompressedMessagesAt writes a batch of messages to the connection's topic
1122// and partition, returning the number of bytes written, partition and offset numbers

Callers 3

WriteMethod · 0.95
WriteMessagesMethod · 0.95
produceRecordsFunction · 0.80

Calls 1

Tested by 1

produceRecordsFunction · 0.64