mfyuce commented on PR #3525: URL: https://github.com/apache/iggy/pull/3525#issuecomment-4768232046
Updated with an additional improvement: instead of detecting `InvalidOffset` reactively on the first poll and recovering on the second, the fix now pre-arms the fallback when a consumer group is **freshly created**. `initialize_consumer_group` returns `true` when it creates the group (stored offset = 0). The caller immediately sets `fallback_to_first = true` so the very first `poll_messages` call uses `PollingStrategy::First` (earliest available offset) rather than `Next` (stored offset = 0). This eliminates the guaranteed `InvalidOffset` error on startup that the previous version of the fix could not avoid. Both the initial `init_consumer_group` path and the reconnect `subscribe_events` path are updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
