Repository navigation
v0.1.2
🔄 Changed
- Requires
ddutils >= 0.4.0, < 0.5.0. The README and the producer docstring wire the producer registry withprocess_loop_scopefrom ddutils 0.4.0 instead ofos.getpid, since anAIOKafkaProduceris bound to the event loop it was started in.
📝 Docs
- Producer: with the default
acks='all'a topic with fewer replicas than the cluster'smin.insync.replicasrejects every record withNotEnoughReplicas.create()does not fail on it, the rejection arrives later and is only visible as theKAFKA_PRODUCER: Delivery failedERROR log entry; a single-broker compose works because itsmin.insync.replicasis 1, a cluster whose topics are not yet configured for it needsProducerConfig(acks=1)until they are. TheProducerConfigdefaults are tabulated,idempotent_key=Nonesends no key and spreads the records round-robin,create_producer,serialize_keyandserialize_valueare named as public. - Consumer: the class attributes with their defaults and the checks at class definition; the offsets of a batch are recorded before it is handed out, so
commit()goes after the batch is processed; records dropped byskip_undeserializableare committed past for good; thetimestamp_threshold_minutesboundary is looked up once perget_batches()and the filter is off when nothing is younger than the threshold;ConsumerConfigis documented,enable_auto_commitaccepts onlyFalseand why. - Consumer maker:
Lockableincludes thetimeoutattribute, the lock key is'{group_id}_{topic}_partition_{partition}'solock_kwargsmust not containkey, an exit caused by an exception does not commit, thestreampacing rule (stream_round_pauseplus poll timeout within half of the lock timeout,ValueErrorotherwise) and why a streaming lock wants tens of seconds, with an example. KafkaDsnsubclasses pydantic's private_BaseMultiHostUrl, the reason forpydantic>=2.10. The layout follows dd-lib-stub, with a Compatibility section.
Full Changelog: v0.1.1...v0.1.2