Example of a Counter with Sharpino, with Kafka.
Prerequisites: dbmate, postgres, Apache Kafka
clone project
Create a file named .env with content like this (substituting the postgresusername/postgrespassword with your own):
DATABASE_URL="postgres://postgresusername:postgrespassword@127.0.0.1:5432/es_counter?sslmode=disable"
on Kafka create a topic named "counter"
kafka-topics.sh --create --topic counter-01 --bootstrap-server localhost:9092
then run the commands:
then run the commands:
dbmate up
and run the following command:
dotnet run
A 6 min reading article about this example can be found here