distributed 2.2.3

CQRS/ES framework for Rust using Plain Old Rust Structs — append-only events, replay, snapshots, outbox, service bus, and pluggable infrastructure
Documentation
# Local dependencies for development and transport integration tests.
#
#   docker compose up -d            # start all
#   docker compose up -d postgres   # just one
#
# Then point each test's env var at the service and run the feature-gated target
# (each integration test skips when its env var is unset):
#
#   DATABASE_URL=postgres://sourced:sourced@localhost:5432/distributed \
#     cargo test --test postgres_transport --features postgres
#   AMQP_URL=amqp://guest:guest@localhost:5672/%2f \
#     cargo test --test rabbitmq_transport --features rabbitmq
#   KAFKA_BROKERS=127.0.0.1:9092 \
#     cargo test --test kafka_transport --features kafka
#   NATS_URL=nats://localhost:4222 \
#     cargo test --test nats_transport --features nats
services:
  postgres:
    image: postgres:18
    environment:
      POSTGRES_USER: sourced
      POSTGRES_PASSWORD: sourced
      POSTGRES_DB: distributed
    ports:
      - "5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U sourced -d distributed"]
      interval: 2s
      timeout: 5s
      retries: 20

  rabbitmq:
    image: rabbitmq:4.3-management-alpine
    ports:
      - "5672:5672"   # AMQP
      - "15672:15672" # management UI
    healthcheck:
      test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
      interval: 5s
      timeout: 5s
      retries: 20

  kafka:
    image: apache/kafka:4.3.0
    ports:
      - "9092:9092"
    environment:
      KAFKA_NODE_ID: 1
      KAFKA_PROCESS_ROLES: broker,controller
      KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092
      KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
      KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
      KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
    healthcheck:
      test: ["CMD-SHELL", "/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092 || exit 1"]
      interval: 10s
      timeout: 10s
      retries: 30

  nats:
    image: nats:2.14-alpine
    command: ["-js", "-m", "8222"] # JetStream + HTTP monitoring (for healthcheck)
    ports:
      - "4222:4222"
      - "8222:8222"
    healthcheck:
      test: ["CMD-SHELL", "wget -q -O - http://localhost:8222/healthz || exit 1"]
      interval: 5s
      timeout: 5s
      retries: 20