Quickstart

JAR quickstart

To connect the latest Kpow JAR to a Kafka cluster:

Note: Quoting may be required for some variables

Some variables may require quotes, and each line ends with a \ character.

#!/usr/bin/env bash

set -Eeuxo pipefail

JVM_OPTS="-server -XX:MaxInlineLevel=15 -Djava.awt.headless=true -Xmx8G \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED"

BOOTSTRAP="kafka-1:9092,kafka-2:9092,kafka-3:9092" \
LICENSE_ID=1c99v4-f690-4a4f-b144-73de2369444a \
LICENSE_CODE=TRIAL_30D \
LICENSEE="My Corp" \
LICENSE_EXPIRY=2020-09-05 \
LICENSE_SIGNATURE=15CFFF969111DB6DCA142B6F1E0065F94A614251B80128D52C2CD45993A021AE10E90F57B90FF76CC1B992C16E54BCF1CBE7E5EE3124B3E585BE133774836A6EBB51B55E67EF60F4A435EBEC9F07A26CEABDCF6E3CF4137A33201E7662AF1F7986E57341E0EAEB884BBF320C348D62679F521259DAD1E03F6F79DB53D83CD41B \
ENVIRONMENT_NAME="Trade Book (Staging)" \
ALLOW_TOPIC_CREATE=true \
ALLOW_TOPIC_DELETE=true \
ALLOW_TOPIC_EDIT=true \
ALLOW_TOPIC_INSPECT=true \
ALLOW_TOPIC_PRODUCE=true \
java $JVM_OPTS -jar  ./kpow-latest.jar
  • Run chmod +x start-kpow.sh then ./start-kpow.sh
  • Kpow is now running on http://localhost:3000

Java commands

In general we recommend starting Kpow with a Java command similar to our Dockerfile:

JVM_OPTS="-server -XX:MaxInlineLevel=15 -Djava.awt.headless=true -Xmx8G \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED"

java $JVM_OPTS -jar ./kpow-latest.jar

However java -jar strips any classpath parameters you pass to the command which might be a problem in certain installation cases or when configuring custom Custom Serdes. See: Data inspect.

To pass extra classpath parameters to Kpow, or simply to start with the plain java command you can:

java $JVM_OPTS -cp ./kpow-latest.jar:another.jar factorhouse.kpow

Required Java Flags (JDK17+)

Customers using Java JDK 17+ will be required to add the following flags to their startup script:

 --add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.jaxp=ALL-UNNAMED \
 --add-opens=java.xml/com.sun.org.apache.xerces.internal.util=ALL-UNNAMED"

These are required to run our products with Java 17+. One of our external dependencies requires internal XML processing classes (from Xerces) and JDK 17+ enforces stricter module boundaries, blocking reflective access to internal APIs by default.

Previous
Docker