Commit Graph
3 Commits
Author SHA1 Message Date
Matthew Meszaros 559d05a458 feat: use dot-separated event-bus topic names for Kafka compatibility 2026-06-01 12:49:24 +02:00
Matthew Meszaros d2414ad29f ci(go): gofmt all flagged files
Go CI fails on golangci-lint's gofmt check. Ran gofmt -w against
every file the linter named plus a handful of others that drifted
during the autonomous-fleet work. No semantic changes — alignment
of struct field whitespace and one mis-indented import block.

gofmt -l ./... is now empty; go build + go vet are clean.
2026-05-27 16:40:23 +00:00
Matthew Meszaros a552e69070 infra(eventbus): EventBus interface + NATS JetStream impl
Transport-agnostic EventBus (Publish / Subscribe / Close / Name) with
two implementations:

  KafkaBus  - wraps the existing internal/infrastructure/kafka producer
              and consumer. Existing call sites that use the kafka
              package directly keep working.
  NATSBus   - JetStream-backed. File storage, 7d max age, durable
              consumers per group, manual ack with redelivery on
              handler error.

Factory FromEnv selects via EVENTBUS_PROVIDER (default kafka). NATS
needs NATS_URL; Kafka reuses the existing bootstrap+SASL config.

Subject naming converts Kafka colons to NATS dots so the existing
w:<uuid> topic naming works on both backends.

16 tests including round-trip ack-redelivery against an embedded
nats-server.
2026-05-27 14:42:33 +00:00