nats-provisioner

JetStream streams and consumers, with warnings when immutable fields drift.

  • v1.1.0 · latest
  • MIT
  • Go
docker pull ghcr.io/datarocks-ag/nats-provisioner:1.1.0

What it does

  • Streams and consumers — Idempotent provisioning of JetStream streams and their consumers.
  • Strategy — update or create — globally or per stream.
  • Day durations — Durations accept Go syntax and day notation such as 7d.
  • Immutable field warnings — Warns on mismatched storage, retention, deny_delete and deny_purge.
  • Resilient and observable — Exponential backoff for NATS connectivity; structured JSON logs.
config.example.yaml
streams:
  - name: "ORDERS"
    description: "Order events stream"
    subjects: ["orders.>"]
    retention: "limits"
    storage: "file"
    max_msgs: -1
    max_bytes: 1073741824
    max_age: "7d"
    max_msg_size: -1
    num_replicas: 1
    discard: "old"
    duplicate_window: "2m"
    deny_delete: false
    deny_purge: false
    allow_rollup: false

    consumers:
      - name: "order-processor"
        description: "Processes new orders"
        filter_subject: "orders.created"
        ack_policy: "explicit"
        ack_wait: "30s"
        max_deliver: 5
        deliver_policy: "all"
        replay_policy: "instant"
        max_ack_pending: 1000
        inactive_threshold: "5m"

      - name: "order-logger"
        description: "Logs all order events"
        ack_policy: "none"
        deliver_policy: "all"
Excerpt from config.example.yaml

Documentation for this project lives in its README on GitHub.

Documentation on GitHub ↗

Data Rocks AG

[ONE OR TWO LINES ON WHAT DATA ROCKS DOES AND FOR WHOM]

Visit datarocks.ch →