Apologies for disappearing. This is how I got it working. In hindsight, I
should have known better and tried this first.
byte[] keyBytes = new byte[record.keySize()];
record.key().get(keyBytes);
byte[] valueBytes = new byte[record.valueSize()];
record.value().get(valueBytes);
On Sun, Dec 29, 2024
Hi Chain Head,
Are you seeing any errors, or just getting empty strings for k and v?
If you are seeing empty strings, it could well be that the ByteBuffer
returned by Record.key() and Record.value() have their position set to
the ByteBuffer's length. i.e. at the end of the ByteBuffer.
Have y
Hi,
I apologize for misunderstanding your initial email. Unfortunately I still
don't understand your question. Could you clarify what result you expect
from your code, and what the actual behavior is?
Maybe also try and simplify the reproduction case. I see confusing use of a
String constructor t
Hi,
I am looking at parsing Produce request API on broker side. This is for
simulating a broker. No consumer is involved. Also, I am using 3.8.0.
On Sat, 28 Dec, 2024, 04:47 Greg Harris,
wrote:
> Hi,
>
> Thanks for your question.
>
> It appears you're using the legacy consumer API, which was rem
Hi,
I am looking at parsing Produce request API on broker side. This is for
simulating a broker. No consumer is involved. Also, I am using 3.8.0.
On Sat, 28 Dec, 2024, 04:47 Greg Harris,
wrote:
> Hi,
>
> Thanks for your question.
>
> It appears you're using the legacy consumer API, which was rem
Hi,
Thanks for your question.
It appears you're using the legacy consumer API, which was removed in 2.0.0
and is no longer supported.
I would strongly suggest building on top of the modern Java Consumer API at
this time.
The modern API exposes the deserialized headers via the
ConsumerRecord#head