From 71a163468b37f8a88bcc8614de8e52663c81114e Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Fri, 20 Sep 2024 16:53:19 +0300 Subject: [PATCH] confluent: check producer before setup --- faststream/confluent/broker/broker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/faststream/confluent/broker/broker.py b/faststream/confluent/broker/broker.py index 570f2d6b16..879165e016 100644 --- a/faststream/confluent/broker/broker.py +++ b/faststream/confluent/broker/broker.py @@ -470,7 +470,8 @@ async def start(self) -> None: def _setup(self, state: Optional["BaseState"] = None) -> None: super()._setup(state) - self._producer._setup(self._state.logger_state) + if self._producer: + self._producer._setup(self._state.logger_state) @property def _subscriber_setup_extra(self) -> "AnyDict":