Repository navigation
v0.1.0
🚀 Added
create_producer(bootstrap_servers, config=None): a startedAIOKafkaProducerwith the library's serializers, thecreate_funcof the registry behind a producer factory.dsn.KafkaDsn: a settings field for the bootstrap servers,kafka://host[:port][,host[:port]], validated as a URL like pydantic'sPostgresDsn;bootstrap_serversgives the['host:port', ...]list the aiokafka clients take, a missing port is 9092.
🔄 Changed
- The producer no longer owns its
AIOKafkaProducer.BaseKafkaProducer.producer_factory, aConnectionManagerFactoryfrom ddutils called withalias, hands the producer out for every send, the way a ddsql adapter runs a query insidefactory(alias=...). The factory owns the producer's scope (aScopedRegistryofcreate_producerper alias, one producer per process and event loop), its lazy start and its stop on shutdown throughclose().
⚠️ Breaking changes
BaseKafkaProducerRepository→BaseKafkaProducer,BaseKafkaConsumerRepository→BaseKafkaConsumer,KafkaConsumerRepositoryMaker→KafkaConsumerMaker(itsconsumer_repoattribute isconsumer). They are owned by a context repository, not repositories themselves.BaseKafkaProducer: thebootstrap_serversandconfigclass attributes, the per-class lock andstop()are replaced byproducer_factory(+ optionalalias); stop the producers withproducer_factory.close()on shutdown.- Requires ddutils 0.3.1 and pydantic 2.10.
Full Changelog: v0.0.2...v0.1.0