Skip to content

supersven/jpa-cockroachdb

 
 

Repository files navigation

Example project: kafka-driven accounting

Getting started

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 8180 --postbootcommandfile ../src/main/docker/postbootcommands.asadmin

Set the working directory to the maven target folder

Do a maven install before running it.

Create a player

Execute the request defined in the register.http file to register the user 'John Doe'

Send some accounting events

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"}

Responses

The responses are delivered in 2 different topics:

  • transactionChanges for successful transactions
  • transactionFailures for failures during processing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.9%
  • Shell 1.1%