Question about fd8: Fetch multiple messages from disk problem reading second batch

remote: [tester::#FD8] Hexdump of received “Fetch” response:

remote: [tester::#FD8] Idx | Hex | ASCII

remote: [tester::#FD8] -----±------------------------------------------------±----------------

remote: [tester::#FD8] 0000 | 00 00 00 f8 78 49 12 c7 00 00 00 00 00 00 00 00 | …xI…

remote: [tester::#FD8] 0010 | 00 00 00 02 00 00 00 00 00 00 40 00 80 00 00 00 | …@…

remote: [tester::#FD8] 0020 | 00 00 00 56 02 00 00 00 00 00 00 00 00 00 00 00 | …V…

remote: [tester::#FD8] 0030 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | …

remote: [tester::#FD8] 0040 | 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 | …

remote: [tester::#FD8] 0050 | 00 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 | …

remote: [tester::#FD8] 0060 | 00 00 00 00 44 00 00 00 00 02 ab fd 04 91 00 00 | …D…

remote: [tester::#FD8] 0070 | 00 00 00 00 00 00 01 91 e0 5b 6d 8b 00 00 01 91 | …[m…

remote: [tester::#FD8] 0080 | e0 5b 6d 8b 00 00 00 00 00 00 00 00 00 00 00 00 | .[m…

remote: [tester::#FD8] 0090 | 00 00 00 00 00 01 24 00 00 00 01 18 48 65 6c 6c | …$…Hell

remote: [tester::#FD8] 00a0 | 6f 20 4b 61 66 6b 61 21 00 00 00 00 00 00 00 00 | o Kafka!..

remote: [tester::#FD8] 00b0 | 01 00 00 00 44 00 00 00 00 02 64 61 7c 4a 00 00 | …D…da|J..

remote: [tester::#FD8] 00c0 | 00 00 00 00 00 00 01 91 e0 5b 6d 8b 00 00 01 91 | …[m…

remote: [tester::#FD8] 00d0 | e0 5b 6d 8b 00 00 00 00 00 00 00 00 00 00 00 00 | .[m…

remote: [tester::#FD8] 00e0 | 00 00 00 00 00 01 24 00 00 00 01 18 48 65 6c 6c | …$…Hell

remote: [tester::#FD8] 00f0 | 6f 20 45 61 72 74 68 21 00 00 00 00 | o Earth!..

remote: [tester::#FD8]

remote: [tester::#FD8] [Decoder] - .ResponseHeader

remote: [tester::#FD8] [Decoder] - .correlation_id (2018054855)

remote: [tester::#FD8] [Decoder] - .TAG_BUFFER

remote: [tester::#FD8] [Decoder] - .ResponseBody

remote: [tester::#FD8] [Decoder] - .throttle_time_ms (0)

remote: [tester::#FD8] [Decoder] - .error_code (0)

remote: [tester::#FD8] [Decoder] - .session_id (0)

remote: [tester::#FD8] [Decoder] - .num_responses (1)

remote: [tester::#FD8] [Decoder] - .TopicResponse[0]

remote: [tester::#FD8] [Decoder] - .topic_id (00000000-0000-4000-8000-000000000056)

remote: [tester::#FD8] [Decoder] - .num_partitions (1)

remote: [tester::#FD8] [Decoder] - .PartitionResponse[0]

remote: [tester::#FD8] [Decoder] - .partition_index (0)

remote: [tester::#FD8] [Decoder] - .error_code (0)

remote: [tester::#FD8] [Decoder] - .high_watermark (0)

remote: [tester::#FD8] [Decoder] - .last_stable_offset (0)

remote: [tester::#FD8] [Decoder] - .log_start_offset (0)

remote: [tester::#FD8] [Decoder] - .num_aborted_transactions (1)

remote: [tester::#FD8] [Decoder] - .AbortedTransaction[0]

remote: [tester::#FD8] [Decoder] - .producer_id (0)

remote: [tester::#FD8] [Decoder] - .first_offset (0)

remote: [tester::#FD8] [Decoder] - .preferred_read_replica (0)

remote: [tester::#FD8] [Decoder] - .compact_records_length (2)

remote: [tester::#FD8] [Decoder] - .RecordBatch[0]

remote: [tester::#FD8] [Decoder] - .base_offset (0)

remote: [tester::#FD8] [Decoder] - .batch_length (68)

remote: [tester::#FD8] [Decoder] - .partition_leader_epoch (0)

remote: [tester::#FD8] [Decoder] - .magic_byte (2)

remote: [tester::#FD8] [Decoder] - .crc (-1409481583)

remote: [tester::#FD8] [Decoder] - .record_attributes (0)

remote: [tester::#FD8] [Decoder] - .last_offset_delta (0)

remote: [tester::#FD8] [Decoder] - .base_timestamp (1726045973899)

remote: [tester::#FD8] [Decoder] - .max_timestamp (1726045973899)

remote: [tester::#FD8] [Decoder] - .producer_id (0)

remote: [tester::#FD8] [Decoder] - .producer_epoch (0)

remote: [tester::#FD8] [Decoder] - .base_sequence (0)

remote: [tester::#FD8] [Decoder] - .num_records (1)

remote: [tester::#FD8] [Decoder] - .Record[0]

remote: [tester::#FD8] [Decoder] - .length (18)

remote: [tester::#FD8] [Decoder] - .attributes (0)

remote: [tester::#FD8] [Decoder] - .timestamp_delta (0)

remote: [tester::#FD8] [Decoder] - .offset_delta (0)

remote: [tester::#FD8] [Decoder] - .key_length (-1)

remote: [tester::#FD8] [Decoder] - .key (“”)

remote: [tester::#FD8] [Decoder] - .value_length (12)

remote: [tester::#FD8] [Decoder] - .value (“Hello Kafka!”)

remote: [tester::#FD8] [Decoder] - .num_headers (0)

remote: [tester::#FD8] [Decoder] - .TAG_BUFFER

remote: [tester::#FD8] [Decoder] - .TAG_BUFFER

remote: [tester::#FD8] [Decoder] - .TAG_BUFFER

remote: [tester::#FD8] Received:

remote: [tester::#FD8] Hex (bytes 163-178) | ASCII

remote: [tester::#FD8] ------------------------------------------------±-----------------

remote: [tester::#FD8] 21 00 00 00 00 00 00 00 00 01 00 00 00 44 00 00 | !..D..

remote: [tester::#FD8] ^ ^

remote: [tester::#FD8] Error: unexpected 80 bytes remaining in decoder after decoding FetchResponse

remote: [tester::#FD8] Context:

remote: [tester::#FD8] - Fetch Response v16

remote: [tester::#FD8] - Response Body

remote: [tester::#FD8]

remote: [tester::#FD8] Test failed

remote: [tester::#FD8] Terminating program

remote: [tester::#FD8] Program terminated successfully

anyone can help me on why this doesnt read the second record batch

Hey @goncalognogueira, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

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