Skip to content

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 19 Oct 18:14
· 2 commits to main since this release
d12b9e8

🔄 Changed

  • Requires ddutils >= 0.4.0, < 0.5.0. The README and the producer docstring wire the producer registry with process_loop_scope from ddutils 0.4.0 instead of os.getpid, since an AIOKafkaProducer is bound to the event loop it was started in.

📝 Docs

  • Producer: with the default acks='all' a topic with fewer replicas than the cluster's min.insync.replicas rejects every record with NotEnoughReplicas. create() does not fail on it, the rejection arrives later and is only visible as the KAFKA_PRODUCER: Delivery failed ERROR log entry; a single-broker compose works because its min.insync.replicas is 1, a cluster whose topics are not yet configured for it needs ProducerConfig(acks=1) until they are. The ProducerConfig defaults are tabulated, idempotent_key=None sends no key and spreads the records round-robin, create_producer, serialize_key and serialize_value are 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 by skip_undeserializable are committed past for good; the timestamp_threshold_minutes boundary is looked up once per get_batches() and the filter is off when nothing is younger than the threshold; ConsumerConfig is documented, enable_auto_commit accepts only False and why.
  • Consumer maker: Lockable includes the timeout attribute, the lock key is '{group_id}_{topic}_partition_{partition}' so lock_kwargs must not contain key, an exit caused by an exception does not commit, the stream pacing rule (stream_round_pause plus poll timeout within half of the lock timeout, ValueError otherwise) and why a streaming lock wants tens of seconds, with an example.
  • KafkaDsn subclasses pydantic's private _BaseMultiHostUrl, the reason for pydantic>=2.10. The layout follows dd-lib-stub, with a Compatibility section.

Full Changelog: v0.1.1...v0.1.2