GuillaumeDeconinck / todos-fastify

Todos API written in Typescript, trying to implement the best practices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make CUD operations to publish events

GuillaumeDeconinck opened this issue · comments

So that other services can react to these events (if needed).

Ideally, these events shouldn't be published directly, but instead stored in DB along with the actual operation (create, update, delete) in a transaction, so that we can be sure the event will be published at some point (otherwise a crash might do the update in DB but fail to publish the event) => Microservices patterns.

Note that documentation on the event should be written, maybe time to investigate https://www.asyncapi.com/