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)
| 1114 | // |
| 1115 | // If the compression codec is not nil, the messages will be compressed. |
| 1116 | func (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 |