dedsec-terminal opened a new pull request, #4184:
URL: https://github.com/apache/iggy/pull/4184

   ## Which issue does this PR address?
   
   Closes #4165
   
   ## Rationale
   
   The Rust high-level consumer exposes an async shutdown() that drains pending 
offsets, does the final commit, leaves the group and stops the watcher. The 
Python IggyConsumer had no equivalent, and consumer_group() did not expose 
offset_drain_timeout, so there was no way to trigger that cleanup from Python.
   
   ## What changed?
   
   Added async IggyConsumer.shutdown(), following the same 
lock-and-map-to-RuntimeError pattern as the other consumer methods. It is 
idempotent through the Rust implementation. Added an optional 
offset_drain_timeout to IggyClient.consumer_group(), converted to IggyDuration 
and passed to IggyConsumerBuilder::offset_drain_timeout(). Omitted keeps the 
Rust default of five seconds. Documented the supported order in 
consume_messages(), iter_messages(), consumer_group() and shutdown(): signal 
the event, let consume_messages() return or finish iterating, then call 
shutdown(). Updated the stub, the high-level consumer example, and added 
shutdown and timeout tests to test_consumer_group.py.
   
   ## Local Execution
   
   - Passed: ruff check and ruff format --check on the touched Python files, 
py_compile on the tests and example, ast parse on the .pyi, git diff --check
   - Not run: cargo fmt / clippy / stub_gen and the live-server pytest suite 
(no Rust toolchain or running server on this machine); the .pyi entries were 
written by hand to match the new methods


-- 
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]

Reply via email to