I have a flyweight style protocol that I use for my messages. Thus they
require no serialization/deserialization to be processed. The messages are
just offset, length pairs within a ByteBuffer.

Is there a producer and consumer API that forgoes allocation? I just want
to give the kakfa producer offsets from a ByteBuffer. Similarly it would be
ideal if I could get a ByteBuffer and offsets into it from the consumer.
Even if I could get byte arrays (implying a copy but no decoding phase) on
the consumer that would be great. Right now it seems to me that the only
way to get messages from Kafka is through a message object, which implies
Kafka allocates these messages all the time. I am willing to use the
upcoming 0.9 API too.

Thanks.

Reply via email to