Skip to content

v0.2.0

Latest

Choose a tag to compare

@zloevil zloevil released this 24 Jun 16:18

✨ Highlights

Kafka — choose your subscriber delivery guarantee

Kafka subscribers can now pick how the consumer offset is committed relative to handler processing, via SubscriberConfigBuilder.DeliveryGuarantee:

  • AtMostOnce — the default and unchanged behavior: the offset is committed on read, before handlers run, with the parallel per-key worker pool. Fastest, but in-flight messages are lost on shutdown/crash. Existing subscribers are unaffected.
  • AtLeastOnce — opt-in: the offset is committed only after a handler returns nil, so nothing is lost on SIGTERM / scale-down / crash — uncommitted messages are redelivered. A failing or panicking handler is retried on the same message, commits are forced synchronous and still land during graceful shutdown, and an unrecognized guarantee is rejected at AddSubscriber. Messages are processed sequentially, so handlers must be idempotent.
broker.AddSubscriber(ctx,
    kafka.NewTopicCfgBuilder("orders").Build(),
    kafka.NewSubscriberCfgBuilder().
        GroupId("my-service").
        DeliveryGuarantee(kafka.AtLeastOnce).
        Build(),
    handler,
)

⚠️ Breaking changes

  • Root-package mocks renamed. mocks/kit_mocks.gomocks/jet_mocks.go, and KitAppErrBuilder / KitCLogger / … → JetAppErrBuilder / JetCLogger / …. All other mock names are unchanged.
  • Error code KIT-001JET-001 (ErrCodeAdapterConfigInvalid).

🧹 Maintenance

  • Removed the original internal kit package name throughout — import aliases (kit*jet*), docs, the jet-toolkit skill and the agents. The project now references only github.com/zloevil/jet.
  • Added a checked-in .mockery.yaml (mockery v3) so make mock works out of the box; all mocks were regenerated from it.

Full Changelog: v0.1.1...v0.2.0