-
Start a local PostgresSQL server on default port 5432 and a Kafka broker on port 9092. The included
docker-compose.yml
starts everything required for running locally.docker-compose up -d # creates the tables needed for Akka Persistence # as well as the offset store table for Akka Projection docker exec -i shopping-cart-service_postgres-db_1 psql -U shopping-cart -t < ddl-scripts/create_tables.sql # creates the user defined projection table. docker exec -i shopping-cart-service_postgres-db_1 psql -U shopping-cart -t < ddl-scripts/create_user_tables.sql
-
Start a first node:
sbt -Dconfig.resource=local1.conf run
-
Try it with grpcurl:
# add item to cart grpcurl -d '{"cartId":"cart1", "itemId":"hoodie", "quantity":5}' -plaintext 127.0.0.1:8101 shoppingcart.ShoppingCartService.AddItem # get popularity grpcurl -d '{"itemId":"hoodie"}' -plaintext 127.0.0.1:8101 shoppingcart.ShoppingCartService.GetItemPopularity
schrepfler / akka-replicated-event-sourcing-grpc Goto Github PK
View Code? Open in Web Editor NEWThis project forked from patriknw/akka-replicated-event-sourcing-grpc
License: Apache License 2.0