diff --git a/_examples/basic/1-your-first-app/README.md b/_examples/basic/1-your-first-app/README.md index 44249a061..ca8d8856f 100644 --- a/_examples/basic/1-your-first-app/README.md +++ b/_examples/basic/1-your-first-app/README.md @@ -38,7 +38,7 @@ server_1 | 2019/08/29 19:41:29 received event {ID:9} Open another terminal and take a look at Kafka topics to see that all messages are there. The initial events should be present on the `events` topic: ```bash -> docker-compose exec kafka kafka-console-consumer --bootstrap-server localhost:9092 --topic events +> docker-compose exec server mill kafka consume -b kafka:9092 --topic events {"id":12} {"id":13} @@ -51,7 +51,7 @@ Open another terminal and take a look at Kafka topics to see that all messages a And the processed messages will be stored in the `events-processed` topic: ```bash -> docker-compose exec kafka kafka-console-consumer --bootstrap-server localhost:9092 --topic events-processed +> docker-compose exec server mill kafka consume -b kafka:9092 -t events-processed {"processed_id":21,"time":"2019-08-29T19:42:31.4464598Z"} {"processed_id":22,"time":"2019-08-29T19:42:32.4501767Z"} diff --git a/_examples/basic/1-your-first-app/docker-compose.yml b/_examples/basic/1-your-first-app/docker-compose.yml index 5366dcf17..5841b5022 100644 --- a/_examples/basic/1-your-first-app/docker-compose.yml +++ b/_examples/basic/1-your-first-app/docker-compose.yml @@ -6,7 +6,9 @@ services: - .:/app - $GOPATH/pkg/mod:/go/pkg/mod working_dir: /app - command: go run main.go + command: > + /bin/sh -c "go install github.com/ThreeDotsLabs/watermill/tools/mill@latest && + go run main.go" kafka: image: bitnami/kafka:3.5.0 diff --git a/_examples/basic/2-realtime-feed/README.md b/_examples/basic/2-realtime-feed/README.md index 68db9b0d3..fbd0ee1ea 100644 --- a/_examples/basic/2-realtime-feed/README.md +++ b/_examples/basic/2-realtime-feed/README.md @@ -27,7 +27,7 @@ You should see the live feed of posts on the standard output. 1. Peek into the posts counter published on `posts_count` topic. ``` -docker-compose exec kafka kafka-console-consumer --bootstrap-server localhost:9092 --topic posts_count +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. diff --git a/_examples/basic/2-realtime-feed/docker-compose.yml b/_examples/basic/2-realtime-feed/docker-compose.yml index 6c7ac2dc5..af0147882 100644 --- a/_examples/basic/2-realtime-feed/docker-compose.yml +++ b/_examples/basic/2-realtime-feed/docker-compose.yml @@ -19,7 +19,9 @@ services: - .:/app - $GOPATH/pkg/mod:/go/pkg/mod working_dir: /app/consumer/ - command: go run main.go + command: > + /bin/sh -c "go install github.com/ThreeDotsLabs/watermill/tools/mill@latest && + go run main.go" zookeeper: image: confluentinc/cp-zookeeper:7.3.1 diff --git a/_examples/real-world-examples/transactional-events/README.md b/_examples/real-world-examples/transactional-events/README.md index 7305ee9ce..82626184c 100644 --- a/_examples/real-world-examples/transactional-events/README.md +++ b/_examples/real-world-examples/transactional-events/README.md @@ -36,5 +36,5 @@ Observe the log output. You will notice new events, generated by the example. In another terminal, run the following command to consume events produced on the Kafka topic. ```bash -docker-compose exec kafka kafka-console-consumer --bootstrap-server kafka:9092 --topic events +docker-compose exec server mill kafka consume -b kafka:9092 -t events ``` diff --git a/_examples/real-world-examples/transactional-events/docker-compose.yml b/_examples/real-world-examples/transactional-events/docker-compose.yml index 27de13c68..3b3b705b4 100644 --- a/_examples/real-world-examples/transactional-events/docker-compose.yml +++ b/_examples/real-world-examples/transactional-events/docker-compose.yml @@ -8,7 +8,9 @@ services: - .:/app - $GOPATH/pkg/mod:/go/pkg/mod working_dir: /app - command: go run main.go + command: > + /bin/sh -c "go install github.com/ThreeDotsLabs/watermill/tools/mill@latest && + go run main.go" mysql: image: mysql:8.0