providers.mongokafka.MongoKafkaDaoPublisherFactory
A provider implementing the DaoPublisherFactoryProtocol based on MongoDB and
Usage
providers.mongokafka.MongoKafkaDaoPublisherFactory()Apache Kafka.
Methods
| Name | Description |
|---|---|
| __init__() | Please do not call directly! Should be called by the construct method. |
| construct() | Setup and teardown an instance of the provider. |
__init__()
Please do not call directly! Should be called by the construct method.
Usage
__init__(*, config, event_publisher, db_client)
construct()
Setup and teardown an instance of the provider.
Usage
construct(*, config, kafka_producer_cls=AIOKafkaProducer)This method will automatically close the DB connection upon exit.
Parameters
config: MongoKafkaConfig- MongoDB-specific config parameters.
Returns
AsyncGenerator[MongoKafkaDaoPublisherFactory, None]- An instance of the provider.