To run the application you need a postgres or cockroachDB database running.
There must be a database lotto
available. The user/server information is located in the src/main/docker/postbootcommands.asadmin
file.
A kafka cluster is required (local dev cluster is sufficient).
Path to jar:
target/payara-micro.jar
Specify the correct location of the cockroachDB or postgres db in the file:
postbootcommands.asadmin
VM options (define the kafka server... in this case just the local dev cluster):
-Dkafka.servers=localhost:9092
Program arguments:
--deploy kafka-rar.rar --addJars postgresql.jar --deploy ROOT.war --port 8080 --postbootcommandfile ../src/main/docker/postbootcommands.asadmin
Set the working directory to the maven target folder
Do a maven install before running it.
Execute the request defined in the register.http
file to register the user 'John Doe'
The kafka message body has to be in JSON format with the following content:
{"id": "YOUR_TRANSACTION_ID", "playerId": "jdo", "payable": 0, "nonPayable": 250, "description": "just a test"}
The responses are delivered in 2 different topics:
accountUpdates
for successful transactionstransactionFailures
for failures during processing