Use environment variables to customize or override Kafkorama Gateway settings — ideal for Docker and Kubernetes setups.
You might use one or more of the environment variables defined below to customize various aspects of your Kafkorama Gateway. These environment variables should be defined in the following system configuration file:
System configuration file | Platform |
---|---|
/etc/default/kafkorama-gateway |
For deb-based Linux (Debian, Ubuntu) |
/etc/sysconfig/kafkorama-gateway |
For rpm-based Linux (RHEL, CentOS) |
Description | Specifies various extra options for Kafkorama Gateway |
Default value | "" |
Required parameter | Optional |
Use this environment variable to define additional options for Kafkorama Gateway. It can be used to set parameters not defined in the main configuration file or to override existing ones.
Every configurable parameter in Kafkorama Gateway can either be set in the main configuration file or passed as an extra
option using the KAFKORAMA_GATEWAY_EXTRA_OPTS
environment variable, with the following syntax:
-Dparameter=value
Parameter values should be specified without spaces or quotes. For example, use:
-DMemory=512MB
instead of -DMemory='512 MB'
-DLogFolder=/tmp/somefile
instead of -DLogFolder="/tmp/some file"
.Also, parameter values must be defined on a single line. For example, if the LicenseKey
parameter is set across
multiple lines in the configuration file as follows:
LicenseKey = aaaa\
bbbb\
cccc
Then, to redefine it as an extra option, you must write it as -DLicenseKey=aaaabbbbcccc
.
For example, to configure the JMX monitoring on the port 3000
, without using authentication, or to alter the existing
configuration of JMX monitoring use:
KAFKORAMA_GATEWAY_EXTRA_OPTS='-DMonitor=JMX \
-DMonitorJMX.Listen=*:3000 \
-DMonitorJMX.Authentication=false'
Description | Specifies various extra options for Java |
Default value | "" |
Required parameter | Optional |
Use this environment variable to define extra options for the Java Virtual Machine (JVM). In most cases, you won’t need to set this variable. However, certain use cases require specific JVM options.
For example, enabling JMX monitoring when running Kafkorama Gateway in a Docker container or on an AWS EC2 instance, you might
need to set the following options to enable remote JMX access using a tool like jconsole
:
KAFKORAMA_GATEWAY_JAVA_EXTRA_OPTS='-Djava.net.preferIPv4Stack=true \
-Djava.rmi.server.hostname=<hostname>'
Replace <hostname>
with the DNS name of the host machine running the Docker container, or the public DNS name of the
EC2 instance.
Description | Specifies JVM options related to Garbage Collection |
Default value | "-verbosegc -XX:+UseParallelOldGC" |
Required parameter | Optional |
Use this environment variable to configure Java options related to Garbage Collection (GC). In most cases, the default value is sufficient.
Description | Specifies JVM options for Garbage Collection logging |
Default value for Java 8 | "-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:GCLogFileSize=10M -XX:NumberOfGCLogFiles=5 -Xloggc:<LogFolder>/all/gc-%t.log" |
Default value for Java 9+ | "-Xlog:gc*:file=<LogFolder>/all/gc-%t.log:time, uptimemillis:filecount=5,filesize=10000" |
Required parameter | Optional |
Use this environment variable to define Java options for Garbage Collection logging. In most cases, the default settings provide sufficient detail and don’t need to be modified.
Description | Specifies the maximum number of socket descriptors |
Default value | 1000000 |
Required parameter | Optional |
Use this environment variable to define the maximum number of socket descriptors to be used by the maximum number of concurrent users connecting to Kafkorama Gateway. In most cases, the default value is sufficient, as it supports up to 1 million concurrent users per node.