slbotbm commented on code in PR #2552:
URL: https://github.com/apache/iggy/pull/2552#discussion_r2686089774
##########
foreign/python/src/consumer.rs:
##########
@@ -129,6 +130,21 @@ impl IggyConsumer {
})
}
+ /// Asynchronously iterate over `ReceiveMessage`s.
+ ///
+ /// Returns an async iterator that raises `StopAsyncIteration` when no
more messages are available
+ /// or a `PyRuntimeError` on failure.
+ ///
+ /// Note: This method does not currently support `AutoCommit.After`.
+ /// For `AutoCommit.IntervalOrAfter(datetime.timedelta, AutoCommitAfter)`,
+ /// only the interval part is applied; the `after` mode is ignored.
+ /// Use `consume_messages()` if you need commit-after-processing semantics.
+
#[gen_stub(override_return_type(type_repr="collections.abc.AsyncIterator[ReceiveMessage]",
imports=("collections.abc")))]
+ fn iter_messages<'a>(&self) -> ReceiveMessageIterator {
Review Comment:
This is the only part that has been changed by me (the function name + note
doc). The rest is the same as the original PR.
--
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]