⚡️ Implement events streaming in Go with NATS JetStream

What is JetStream ? JetStream is the NATS company streaming solution. The JetStream server is built-in to nats-server and can be enabled with nats command options. You can find more informations about JetStream on the official documentation : https://docs.nats.io/nats-concepts/jetstream. Events streaming example To understand how to do events streaming with JetStream, we will use a fake Twitter app throughout the article. The two application endpoints that will interest us here are: POST /tweets POST /tweets/:id/likes The first one will create a new tweet and the second one permit to like a tweet. As an event streaming application, the POST /tweets will produce tweet_created events and the POST /tweets/:id/likes will produce tweet_liked events. ...

January 8, 2022 · 4 min · Matthieu Drouian