snapshot of https://github.com/ThreeDotsLabs/watermill.git (master, 2026-09-15; blobs > 131072B omitted)
Some checks failed
master / ci (push) Failing after 0s
Some checks failed
master / ci (push) Failing after 0s
This commit is contained in:
34
_examples/basic/2-realtime-feed/README.md
Normal file
34
_examples/basic/2-realtime-feed/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Realtime Feed
|
||||
|
||||
This example features a very busy blogging platform, with thousands of messages showing up on your feed.
|
||||
|
||||
There are two separate applications (microservices) integrating over a Kafka topic. The [`producer`](producer/) generates
|
||||
thousands of "posts" and publishes them to the topic. The [`consumer`](consumer/) subscribes to this topic and
|
||||
displays each post on the standard output.
|
||||
|
||||
The consumer has a throttling middleware enabled, so you have a chance to actually read the posts.
|
||||
|
||||
To understand the background and internals, see [getting started guide](https://watermill.io/learn/getting-started/).
|
||||
|
||||
## Requirements
|
||||
|
||||
To run this example you will need Docker and docker-compose installed. See the [installation guide](https://docs.docker.com/compose/install/).
|
||||
|
||||
## Running
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
You should see the live feed of posts on the standard output.
|
||||
|
||||
## Exercises
|
||||
|
||||
1. Peek into the posts counter published on `posts_count` topic.
|
||||
|
||||
```
|
||||
docker-compose exec consumer mill kafka consume -b kafka:9092 -t posts_count
|
||||
```
|
||||
|
||||
2. Add a persistent storage for incoming posts in the consumer service, instead of displaying them.
|
||||
Consider using the [SQL Publisher](https://github.com/ThreeDotsLabs/watermill-sql).
|
||||
Reference in New Issue
Block a user