You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug:
When using manual commit and committing the next offset (offset + 1), if the consumer is shut down and restarted, the following errors occur: "The requested offset is not within the range of offsets maintained by the server" and "[ConsumerGroup] Offset out of range, resetting to default offset." After these errors, the consumer starts consuming from the first offset again.
To Reproduce:
Start the consumer with the provided code snippet.
Manually commit the next offset (offset + 1).
Shutdown the consumer.
Restart the consumer.
Expected behavior:
The consumer should not consume any more messages after a manual commit, similar to the behavior of automatic commit.
Observed behavior:
After restarting the consumer, the following errors are encountered:
"The requested offset is not within the range of offsets maintained by the server."
"[ConsumerGroup] Offset out of range, resetting to default offset."
The consumer then starts consuming from the first offset again.
Environment:
OS: macOS 13.1
KafkaJS version: kafkajs@2.2.4
Kafka version: v3.3.2
NodeJS version: v20.3.0
Additional context:
The consumer code snippet is provided in the description.
The consumer is part of the 'test-group-4' consumer group.
The errors indicate that the offset requested is not within the server's maintained range, and the consumer group resets to the default offset.
Error Message:
{"level":"ERROR","timestamp":"2024-01-19T04:46:53.973Z","logger":"kafkajs","message":"[Connection] Response Fetch(key: 1, version: 11)","broker":"127.0.0.1:9092","clientId":"example1-consumer","error":"The requested offset is not within the range of offsets maintained by the server","correlationId":0,"size":124}
{"level":"ERROR","timestamp":"2024-01-19T04:46:53.975Z","logger":"kafkajs","message":"[ConsumerGroup] Offset out of range, resetting to default offset","topic":"TEST_KPI_MESSAGE","partition":0,"groupId":"test-group-4","memberId":"example1-consumer-85565b63-3099-4ec5-a2b0-1beb7ba74738"}
Describe the bug:
When using manual commit and committing the next offset (offset + 1), if the consumer is shut down and restarted, the following errors occur: "The requested offset is not within the range of offsets maintained by the server" and "[ConsumerGroup] Offset out of range, resetting to default offset." After these errors, the consumer starts consuming from the first offset again.
To Reproduce:
Expected behavior:
The consumer should not consume any more messages after a manual commit, similar to the behavior of automatic commit.
Observed behavior:
After restarting the consumer, the following errors are encountered:
The consumer then starts consuming from the first offset again.
Environment:
Additional context:
Error Message:
Consumer Code
The text was updated successfully, but these errors were encountered: