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 -1
View File
@@ -3,6 +3,6 @@ LABEL org.opencontainers.image.source="https://git.khalilaliouich.com/khalil/tam
WORKDIR /app
COPY package.json ./
RUN npm install --production
COPY server.js ./
COPY server.js events.js ./
EXPOSE 8080
CMD ["node", "server.js"]