feat(api): publish creature events to Kafka

Every creature action (adopt, feed, play, sleep, kill, revive, delete) and
natural deaths from the decay loop are published to the tamagotchi.events
topic. Best effort: the database stays the source of truth and Kafka being
unavailable never fails a request. Disabled when KAFKA_BROKERS is unset.
This commit is contained in:
kaliouich committed 2026-10-25 20:38:11 +00:00
1 parent 501f6864cd
commit 318523270c
5 files changed
+127 -2

No files matched your search

+1
View File
@@ -12,6 +12,7 @@
"pg": "^8.13.0",
"prom-client": "^15.1.0",
"cors": "^2.8.5",
"kafkajs": "^2.2.4",
"uuid": "^10.0.0"
}
}