-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83a558b
commit 5ca5cf8
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,28 @@ | ||
# Transaction Consumer | ||
# Expense Stream | ||
This is an example to demonstrate how Akka Stream coexists with Akka Typed. You can read the full article [here](https://kaplan.dev/articles/akka-stream-coexistence-with-akka-typed/). | ||
|
||
### How to Run | ||
Create a local kafka cluster and required topics | ||
```bash | ||
cd kafka-docker | ||
docker-compose up -d | ||
``` | ||
|
||
Start kafka console consumer to read the results | ||
```bash | ||
kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic transactions-destination | ||
``` | ||
|
||
Run the application | ||
```bash | ||
sbt run | ||
``` | ||
|
||
Copy example payload and send it with producer | ||
```bash | ||
xclip -selection clipboard payload.json | ||
kafka-console-producer.sh --broker-list localhost:9092 --topic transactions-source | ||
> { "id": "1234", "amount": 13.37, "description": "Test", "timestamp": 1589133043 } | ||
> | ||
``` | ||