An app to read XML from a kafka topic, convert to Json, produce to another kafka topic. Uses Quarkus.
You need:
- a Kafka broker running in a place that this application can access it
- something to write some XML onto the "input" topic.
You can find a suitable environment here, although its far more that needed.
This is a different attempt at implementing this project, but without Kafka Streams.
mvn install
The fat Jar is:
target/xmlJsonConverter-1.0-SNAPSHOT-runner.jar
Run the fat jar:
java -Xmx48M -jar target/xmlJsonConverter-1.0-SNAPSHOT-runner.jar
mvn compile quarkus:dev
Ensure that you have Graal VM RC16 (CE is fine!) on the path.
mvn package -Pnative
The native image is:
target/xmlJsonConverter-1.0-SNAPSHOT-runner
./mvnw package -Pnative -Dnative-image.docker-build=true
docker build -f src/main/docker/Dockerfile.tiny -t sns/quarkus-xml-json-converter-tiny .
docker run -i --rm --network=sns2-system-tests_default -e APP_NAME=linuxXmlToJsonConverter -e MODE=xmlToJson -e KAFKA_BROKER_SERVER=sns2-system-tests_kafka01.internal-service_1 -e KAFKA_BROKER_PORT=9092 -e INPUT_KAFKA_TOPIC=incoming.op.msgs -e OUTPUT_KAFKA_TOPIC=modify.op.msgs sns/quarkus-xml-json-converter-tiny