Hookway

Core — replay/core

# Core half of the replay example (docker-compose.yaml in this directory).
# Both core replicas use this file. A publish that fails under skip_failed is
# acknowledged to the sender and captured by the replay service; an operator
# can then retry it once the destination is back. Demonstrates partial fan-out
# failure capture and destination-only redrive across two core replicas;
# the private control listener is reachable only inside the Compose network.
# See docs/operations/replay-service.md.
server:
  addr: ":8080"
  max_body_bytes: 1048576
metrics:
  enabled: true
  path: /metrics
  addr: ":9090"
replay:
  url: "http://replay:8080"
  capture_token: "${REPLAY_CAPTURE_TOKEN}"
  control:
    # Private: only the replay service calls it (docker-compose.yaml does not
    # publish it to the host).
    addr: ":9092"
    token: "${REPLAY_CONTROL_TOKEN}"
destinations:
  orders_api:
    type: webhook
    webhook:
      url: "http://orders-sink:8080/orders"
      delivery_mode: sync
  audit_api:
    type: webhook
    webhook:
      url: "http://audit-sink:8080/audit"
      delivery_mode: sync
flows:
  orders:
    delivery_failure_policy: skip_failed
    nodes:
      - {id: in, type: http_trigger, path: /webhooks/orders, methods: [POST]}
      - {id: body, type: read_body, max_bytes: 1048576}
      - {id: auth, type: auth, scheme: hmac_sha256_hex, secret: "${ORDERS_WEBHOOK_SECRET}", signature_header: X-Hub-Signature-256}
      - {id: env, type: envelope}
      - {id: orders, type: publish, destination: orders_api, target: created}
      - {id: audit, type: publish, destination: audit_api, target: created}
    edges: [in>body, body>auth, auth>env, env>orders, env>audit]