diff --git a/src/ook/factory.py b/src/ook/factory.py index b08c292..38e78c6 100644 --- a/src/ook/factory.py +++ b/src/ook/factory.py @@ -114,6 +114,9 @@ async def create_standalone( """ factory = await cls.create(logger=logger, kafka_broker=kafka_broker) async with aclosing(factory): + # Manually connect the broker after the publishers are created + # so that the producer can be added to each publisher. + await factory._process_context.kafka_broker.connect() # noqa: SLF001 yield factory async def aclose(self) -> None: