Some test with Lightbend's Lagom (www.lagomframework.com)
Some test with Lightbend’s Lagom (www.lagomframework.com)
Preferences > Resources > Advanced.
)If we don’t want to (or cannot) use the sbt/maven plugins for lagom development we can
use such approach (leas automatic, however more flexible):
This in fact will install and run the full set of tools from Confluent Platform (Community version) (https://confluent.io)
and sometimes can be considered as too much
however if you use those extra tools it can be very handy for you.
Download or copy the contents of the Confluent Community all-in-one Docker Compose file:
curl --silent --output docker-compose.yml \
https://raw.githubusercontent.com/confluentinc/cp-all-in-one/6.2.0-post/cp-all-in-one-community/docker-compose.yml
Start Confluent Platform:
docker-compose up -d
Create a topic test
:
docker-compose exec broker kafka-topics \
--create \
--bootstrap-server localhost:9092 \
--replication-factor 1 \
--partitions 1 \
--topic test
Stop Confluent Containers and Clean Up:
```shell
docker-compose stop
docker system prune -a —volumes —filter “label=io.confluent.docker”
### Set up a cassandra db
1. Pull the latest image:
```shell
docker pull cassandra:latest
If the default port should be replaced use such command
docker run -p 9042:9042 --name cassandra cassandra
docker run -p 9043:9042 --name cassandra cassandra
— Create a table
CREATE TABLE IF NOT EXISTS store.shopping_cart (
userid text PRIMARY KEY,
item_count int,
last_update_timestamp timestamp
);
— Insert some data
INSERT INTO store.shopping_cart
(userid, item_count, last_update_timestamp)
VALUES (‘9876’, 2, toTimeStamp(now()));
INSERT INTO store.shopping_cart
(userid, item_count, last_update_timestamp)
VALUES (‘1234’, 5, toTimeStamp(now()));
4. Connect to CQLSH :
```shell
docker exec -it cassandra /opt/cassandra/bin/cqlsh
docker kill cassandra
docker network rm cassandra
application.mode=prod
java -Dhttp.port=9000 -Dakka.remote.artery.canonical.port=25520 -Dakka.management.http.port=8558 -Dpidfile.path=”/dev/null” -jar service-a-impl-all.jar