Kafka Processor CØSMOS-Block
A Kafka Streams Processor to unwrap CØSMOS blocks into CØSMOS transactions.
Purpose
The Kafka Processor CØSMOS-Block
is basically a Stream Processor which continuously reads CØSMOS blocks from an input
Kafka topic, unwraps the CØSMOS transactions and sends them to an output
topic.
This processor plays well with the CØSMOS Kafka Connector which provides Kafka with CØSMOS blocks ready to be processed.
Implementation
Implementation mainly relies on Kafka Streams API, library to create event-stream applications with the following features:
- no external dependency other than Kafka itself,
- simple and light library,
- fault-tolerant and scalable.
Moreover, this implementation:
- uses Kotkin as primary coding language,
- is as much as possible, lean, i.e. tries to minimize the dependencies to 3rd party libraries and the resulting package footprint.
Build
This project targets the JVM 11+, so be sure to have it available in your environment.
This project relies on the Gradle build system.
If you are on windows then open a command line, go into the root directory and run:
.\gradlew build
If you are on linux/mac then open a terminal, go into the root directory and run:
./gradlew build
This command line produces 2 JAR files:
- a regular JAR:
kafka-processor-cosmos-block-X.Y.jar
- a fat JAR:
kafka-processor-cosmos-block-X.Y-standalone.jar
This last one is the one to use as it contains all the dependencies in it.