diff --git a/faststream/confluent/client.py b/faststream/confluent/client.py index df08355c99..435bb53927 100644 --- a/faststream/confluent/client.py +++ b/faststream/confluent/client.py @@ -350,7 +350,11 @@ async def start(self) -> None: async def commit(self, asynchronous: bool = True) -> None: """Commits the offsets of all messages returned by the last poll operation.""" - await call_or_await(self.consumer.commit, asynchronous=asynchronous) + if asynchronous: + # Asynchronous commit is non-blocking: + self.consumer.commit(asynchronous=True) + else: + await call_or_await(self.consumer.commit, asynchronous=False) async def stop(self) -> None: """Stops the Kafka consumer and releases all resources."""