Producer.reserveMessage

Reserves the space for the next message using specified key and value sizes. This may be used to avoid double-copy. Instead of filling the user's buffer and passing it to pushMessage(), the user may call the reserveMessage() and fill the data directly in the internal buffer using reservedKey and reservedValue slices. This function is used internally by pushMessage() function.

class Producer
void
reserveMessage
(,)

Parameters

keySize int

number of bytes to reserve for the key, -1 for null key

valueSize int

number of bytes to reserve for the value, -1 for the null value

See Also

commitMessage

Meta