Explore core options to fine-tune the performance and behavior of Kafkorama Gateway.
The core parameters of the Kafkorama Gateway are described below.
Description | A string representing the license key |
Default value | No default value |
Required parameter | Required |
The license key is a string composed of numbers and letters. It is issued by Kafkorama for evaluation, development, or production use of the Kafkorama Gateway. To obtain a license key, please contact us.
Description | Specifies the maximum memory (in megabytes) to be used |
Default value | No default value |
Required parameter | Required |
This parameter sets the maximum heap size (-Xmx
) of the Java Virtual Machine (JVM) running the Kafkorama Gateway,
expressed in megabytes (MB).
For example, to allocate 512
megabytes of heap memory, use:
Memory = 512 MB
In a production environment it is recommended to use at least 8192 MB
(i.e. 8 GB) or more, depending on the data load and
the number of simultaneous client connections.
Description | A comma‑separated list of addresses to listen on for client connections |
Default value | No default value |
Required parameter | Optional |
This parameter defines one or more network addresses where Kafkorama Gateway listens for incoming client connections. Each address must be in one of the following forms:
IP Address:Port
DNS Name:Port
[IPv6 Address]:Port
(IPv6 addresses are enclosed in square brackets)Examples
Listen = 192.168.1.1:80, push.example.com:8800
If the port is omitted, the default port 80
is used.
*
(e.g., *:80
) binds the Gateway to all available interfaces.Description | A list of addresses to listen on for encrypted client connections |
Default value | No default value |
Required parameter | Optional |
This parameter follows the same conventions as the Listen parameter, with the exception that if a port is not
specified, the default port 443
is used.
Description | A Java KeyStore (JKS) file with security certificates |
Default value | No default value |
Required parameter | Required if at least one of the following is true: - ListenEncrypted is configured - MonitorJMX.Encryption is configured on true - MonitorHTTP.Encryption is configured on true |
The keystore file must be configured using absolute paths. For example:
KeyStore = /some/path/mykeystore.jks |
For Linux/Unix |
KeyStore = C:/some/path/mykeystore.jks |
For Windows |
The keystore must contain a SSL certificate for each address used in the configuration of the following parameters:
ListenEncrypted |
|
MonitorJMX.Listen |
provided that MonitorJMX.Encryption is set on true |
MonitorHTTP.Listen |
provided that MonitorHTTP.Encryption is set on true |
Run one of the following commands depending on how the address is specified in the configuration:
Certificate for DNS name | keytool -genkeypair \ -dname "CN=push.example.com" \ -alias push.example.com \ -keyalg RSA -validity 3600 \ -keystore mykeystore.jks |
Certificate for IP address | keytool -genkeypair \ -dname "CN=192.168.1.1" \ -alias 192.168.1.1 \ -keyalg RSA -validity 3600 \ -keystore mykeystore.jks |
Certificate for JMX monitoring | keytool -genkeypair \ -dname "CN=jmx" \ -alias jmx \ -keyalg RSA -validity 3600 \ -keystore mykeystore.jks |
You will be asked to set a password for the keystore if it does not exist, or enter the existing password if it already exists. This password must be provided to the KeyStorePassword parameter.
To securely configure a Kafkorama Gateway for the domain push.example.com
, you need:
ListenEncrypted = push.example.com:443
KeyStore = /my/path/mykeystore.jks
KeyStorePassword = mypassword
You should have the following:
push.example.com.key
push.example.com.csr
push.example.com.crt
intermediary.crt
If you have an intermediate certificate, chain it with the signed certificate:
cat intermediary.crt push.example.com.csr >> push.example.com.crt
openssl pkcs12 -export \
-in push.example.com.crt \
-inkey push.example.com.key \
-out push.example.com.pkcs12 \
-name push.example.com \
-passout pass:mypassword
keytool -importkeystore \
-srckeystore push.example.com.pkcs12 \
-srcstoretype PKCS12 \
-srcstorepass mypassword \
-srcalias "push.example.com" \
-destkeystore mykeystore.jks \
-deststoretype JKS \
-deststorepass mypassword \
-destalias "push.example.com"
Verify the keystore contents:
keytool -list -keystore mykeystore.jks -storepass mypassword
To run two Kafkorama Gateway instances with push1.example.com
and push2.example.com
:
ListenEncrypted = push1.example.com:443
KeyStore = /my/path/mykeystore.jks
KeyStorePassword = mypassword
ListenEncrypted = push2.example.com:443
KeyStore = /my/path/mykeystore.jks
KeyStorePassword = mypassword
Import the same wildcard certificate with different aliases:
keytool -importkeystore \
-srckeystore wildcard.example.com.pkcs12 \
-srcstoretype PKCS12 \
-srcstorepass mypassword \
-srcalias "wildcard.example.com" \
-destkeystore mykeystore.jks \
-deststoretype JKS \
-deststorepass mypassword \
-destalias "push1.example.com"
Repeat for push2.example.com
:
keytool -importkeystore \
-srckeystore wildcard.example.com.pkcs12 \
-srcstoretype PKCS12 \
-srcstorepass mypassword \
-srcalias "wildcard.example.com" \
-destkeystore mykeystore.jks \
-deststoretype JKS \
-deststorepass mypassword \
-destalias "push2.example.com"
Then verify:
keytool -list -keystore mykeystore.jks -storepass mypassword
Description | The password used to access the keystore |
Default value | No default value |
Required parameter | Required if the parameter KeyStore is configured |
Set this parameter to the password that was defined when the keystore file was created (see KeyStore). The password is set during the creation of the keystore, typically when adding the first certificate entry, as explained in the KeyStore parameter description.
Description | A list of monitoring options |
Default value | No default value |
Required parameter | Optional |
This parameter specifies the monitoring interfaces to enable. Available options are: JMX
, HTTP
, and Prometheus
. To
enable multiple options, use a comma-separated list.
For example, to enable both JMX
and Prometheus
monitoring, use:
Monitor = JMX, Prometheus
Description | Username for accessing monitoring |
Default value | admin |
Required parameter | Required if at least one of the following is true: - MonitorJMX.Authentication is configured on true - MonitorHTTP.Authentication is configured on true - MonitorPrometheus.Authentication is configured on true |
Description | Password for accessing monitoring |
Default value | pass |
Required parameter | Required if at least one of the following is true: - MonitorJMX.Authentication is configured on true - MonitorHTTP.Authentication is configured on true - MonitorPrometheus.Authentication is configured on true |
Description | Address to listen for JMX monitoring clients |
Default value | No default value |
Required parameter | Optional |
The format of the address used by this parameter is the same as the format of the Listen parameter.
The jconsole
utility (included with OpenJDK) can be used for JMX monitoring. Many commercial tools also support JMX with additional features like dashboards and persistence.
hostname -i
does not return the address configured for MonitorJMX.Listen
(e.g., returns 127.0.0.1
), jconsole
will not connect remotely. Edit /etc/hosts
so that hostname
resolves to the correct IP.
Description | Enable authentication for JMX monitoring |
Default value | No default value |
Required parameter | Optional |
Possible values: true
or false
. If set to true
, clients must provide credentials defined by MonitorUsername and MonitorPassword.
Description | Enable SSL/TLS encryption for JMX monitoring |
Default value | No default value |
Required parameter | Optional |
Possible values: true
or false
. If set to true
, the JMX connection will be secured using SSL/TLS. This is strongly
recommended when monitoring from untrusted networks (e.g., Internet).
The address used by MonitorJMX.Listen must have a certificate entry (with alias jmx
) in the keystore defined by KeyStore.
jconsole
)keytool -export -alias jmx -keystore mykeystore.jks -rfc -file temp.cer
keytool -import -alias jmx -file temp.cer -keystore mytruststore.jks
jmx
:keytool -genkeypair -alias jmx -keyalg RSA -validity 3600 -keystore clientkeystore.jks
jconsole
:jconsole \
-J-Djavax.net.ssl.keyStore=clientkeystore.jks \
-J-Djavax.net.ssl.keyStorePassword=clientkeystore-password \
-J-Djavax.net.ssl.trustStore=mytruststore.jks \
-J-Djavax.net.ssl.trustStorePassword=mytruststore-password
Description | Address to listen for HTTP monitoring clients |
Default value | No default value |
Required parameter | Optional |
The format of the address used by this parameter is the same as the format of the Listen parameter.
Example configuration:
Monitor = HTTP
MonitorUsername = admin
MonitorPassword = pass
MonitorHTTP.Listen = push.example.com:4000
MonitorHTTP.Authentication = true
MonitorHTTP.Encryption = false
Access the monitoring endpoint:
http://push.example.com:4000/stats?username=admin&password=pass
The response format:
<fieldname1>:<value1> <fieldname2>:<value2> ... <fieldnameN>:<valueN>
Each field is a statistic (Average, Max, Std Dev) applied to a metric (e.g., connected clients, messages/sec) for a specific period (e.g., current, last 15 mins, last hour, etc.).
Append view=xml
or view=json
:
http://push.example.com:4000/stats?username=admin&password=pass&view=xml
You can add filters by GET parameters:
http://push.example.com:4000/stats?username=admin&password=pass&indicator=ConnectedSessions&statistic=MAX&period=Last.15.Minute
To get all averages:
http://push.example.com:4000/stats?username=admin&password=pass&statistic=AVG
Parameter | Possible Values | Description |
---|---|---|
indicator |
ConnectedSessions , NumberOfSubjects , InBytesPerSecond , InPublishMessagesPerSecond , OutBytesPerSecond , OutPublishMessagesPerSecond , SessionConnectionsPerSecond , SessionDisconnectionsPerSecond |
Monitoring metrics |
statistic |
AVG , STDEV , MAX |
Statistic to apply |
period |
Current , Last.1.Minute ... Last.15.Month , SinceStartup |
Time period for aggregation |
Enable encryption:
MonitorHTTP.Encryption = true
Use HTTPS:
https://push.example.com:4000/stats?username=user&password=pass
Description | Enable authentication for HTTP monitoring |
Default value | No default value |
Required parameter | Optional |
Values: true
or false
. If true
, access requires credentials defined by MonitorUsername and
MonitorPassword.
Description | Enable SSL/TLS encryption for HTTP monitoring |
Default value | No default value |
Required parameter | Optional |
Values: true
or false
. If true
, the HTTP monitoring endpoint is secured via SSL/TLS. The address defined in
MonitorHTTP.Listen must be backed by a certificate in the KeyStore.
Description | Address to listen for Prometheus monitoring clients |
Default value | No default value |
Required parameter | Optional |
This parameter uses the same address format as Listen.
Description | Enable authentication for Prometheus monitoring |
Default value | No default value |
Required parameter | Optional |
Possible values: true
or false
. If set to true
, access requires credentials specified by
MonitorUsername and MonitorPassword.
Description | Enable SSL/TLS encryption for Prometheus monitoring |
Default value | No default value |
Required parameter | Optional |
Possible values: true
or false
. If set to true
, Prometheus clients will connect via SSL/TLS. This is strongly
recommended when exposing the endpoint over insecure networks such as the Internet.
The address defined in MonitorPrometheus.Listen must have a certificate entry in the keystore
configured by KeyStore. The alias for the certificate must be prometheus
, as described in the
KeyStore parameter documentation.
Description | Folder where logs will be written |
Default value | logs |
Required parameter | Optional |
If not set, the default folder logs
is used relative to the directory from which the Kafkorama Gateway is started.
You can specify an absolute path instead:
LogFolder = /some/path/mylogs |
For Linux/Unix |
LogFolder = C:/some/path/mylogs |
For Windows |
Description | Controls the verbosity of log messages |
Default value | INFO |
Required parameter | Optional |
Available log levels:
TRACE
(most verbose)DEBUG
INFO
(recommended for production)WARN
ERROR
(least verbose)Description | Maximum size of a log file before rotation |
Default value | 10 MB |
Required parameter | Optional |
Accepted units:
KB
for kilobytesMB
for megabytesGB
for gigabytesWhen a log file exceeds this size, it is rotated. Old log files are retained up to the number specified by LogRotateFileCount.
Description | Time interval after which a new log file is created |
Default value | No default value |
Required parameter | Optional |
Time units:
m
for minutesh
for hoursD
for daysW
for weeksM
for monthsY
for yearsExamples:
LogRotateTime = 1 D # Rotate logs daily
LogRotateTime = 4 h # Rotate logs every 4 hours
Takes precedence over LogRotateLimit.
Description | Maximum number of historical log files to keep |
Default value | 100 |
Required parameter | Optional |
When the number of rotated logs exceeds this limit, the oldest log file is deleted.
Description | Specifies the folder from which files will be served |
Default value | html |
Required parameter | Optional |
If not configured, the default folder html
(relative to the directory from which Kafkorama Gateway is started) will be used.
Description | Specify the entitlement type |
Default value | Basic |
Required parameter | Optional |
To define which users of your application have access to which subjects, you can define one of the following Entitlement types:
None
, Basic
, JWT
, or Custom
) can be used. However, if Kafkorama Gateway is
deployed with Kafkorama Portal, then the Portal
entitlement type must be used.
Description | Specify an entitlement token |
Default value | No default value |
Required parameter | Required if Entitlement is set on Basic |
This parameter is used only when Entitlement is set to Basic
.
Description | The URL of your Kafkorama Portal instance |
Default value | No default value |
Required parameter | Required if Entitlement is set to Portal |
The Kafkorama Gateway periodically connects to your Kafkorama Portal at this HTTPS endpoint to retrieve configuration data for the Kafka cluster configurations defined in the portal, as well as entitlement-related information such as expired JWT tokens.
addons/kafka
of Kafkorama Gateway. For
more information, see Kafka Configuration.
Description | The password to authenticate against the Kafkorama Portal |
Default value | No default value |
Required parameter | Required if Entitlement is set to Portal |
Use this parameter to authenticate the periodic entitlement and Kafka configuration queries performed by the Kafkorama Gateway against your Kafkorama Portal instance.