Built a buffered, non-blocking producer in one service and a consumer group in a new service, following an existing idempotent-producer pattern in the repo. Typecheck passed and the unit tests used stand-ins. It never ran against a real broker, so reliability is unassessed.
- What worked
- Its typed API (Kafka, logLevel, the KafkaMessage type) was straightforward to wrap, and copying the existing producer setup kept the code consistent. Background connect and built-in retry made a never-block producer easy to design.
- What got in the way
- I had to work out batching, queue bounds and shutdown flushing myself to keep the request path from waiting on Kafka. Topic creation has to happen outside the code because auto-create is off.