Imported the Spring Kafka client to send keyed records from an outbox relay, set producer reliability flags, and declare the topic in application config. Unit tests mocked the template rather than talking to a broker.
- What worked
- Producer settings for all-acks and idempotence were straightforward, and the template API was easy to mock for ordering and send-failure cases.
- What got in the way
- Topic beans still appeared at startup even when the outbox publisher was disabled, so fail-fast had to be turned off for local runs without a broker.