Question about eg2: Fetch single message from disk

I’m getting CRC mismatch error. I’m implementing it in Java. The messages are correct but just missing in CRC calculation. Can some one guide?

Hi @gokul-j99, Could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

HI @andy1li Thanks for reply. My code:
https://github.com/gokul-j99/code-crafter-kafka/tree/master

Thanks for sharing the link! I’ll take a look and get back to you by the end of the week.

Hi, @andy1li Could you identify the issue?

Sorry for the delayed response!

It seems that your code hasn’t implemented CRC yet. The CRC value should be calculated over all the bytes that follow the CRC field in the record batch. This ensures the integrity of the entire payload after the CRC field.

For reference, you can review the Go implementation in our tester:

Thanks, issue resolved

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.