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

Method WriteCompressedMessagesAt

conn.go:1127–1129  ·  view source on GitHub ↗

WriteCompressedMessagesAt writes a batch of messages to the connection's topic and partition, returning the number of bytes written, partition and offset numbers and timestamp assigned by the kafka broker to the message set. The write is an atomic operation, it either fully succeeds or fails. If th

(codec CompressionCodec, msgs ...Message)

Source from the content-addressed store, hash-verified

1125//
1126// If the compression codec is not nil, the messages will be compressed.
1127func (c *Conn) WriteCompressedMessagesAt(codec CompressionCodec, msgs ...Message) (nbytes int, partition int32, offset int64, appendTime time.Time, err error) {
1128 return c.writeCompressedMessages(codec, msgs...)
1129}
1130
1131func (c *Conn) writeCompressedMessages(codec CompressionCodec, msgs ...Message) (nbytes int, partition int32, offset int64, appendTime time.Time, err error) {
1132 if len(msgs) == 0 {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected