Core Parameters

Explore core options to fine-tune the performance and behavior of Kafkorama Gateway.

The core parameters of the Kafkorama Gateway are described below.

LicenseKey

   
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.

Memory

   
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.

Listen

   
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.

  • Specifying a concrete IP address binds the Gateway only to that address.
  • Using the wildcard address * (e.g., *:80) binds the Gateway to all available interfaces.

ListenEncrypted

   
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.

KeyStore

   
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

Adding a Self-Signed Certificate to the Keystore

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.

Adding a CA-Signed Certificate to the Keystore

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

Step 1: Prepare Certificate Files

You should have the following:

  • Private Key: push.example.com.key
  • CSR (Certificate Signing Request): push.example.com.csr
  • Signed Certificate: push.example.com.crt
  • Intermediate Certificate (optional): 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

Step 2: Convert to PKCS#12 Format

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

Step 3: Import into JKS Keystore

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

Using a Wildcard CA-Signed Certificate

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

KeyStorePassword

   
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.

Monitor

   
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

MonitorUsername

   
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

MonitorPassword

   
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

MonitorJMX.Listen

   
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.

MonitorJMX.Authentication

   
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.

MonitorJMX.Encryption

   
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.

Secure JMX Monitoring (Example using jconsole)

  1. Create a truststore for the client:
keytool -export -alias jmx -keystore mykeystore.jks -rfc -file temp.cer
keytool -import -alias jmx -file temp.cer -keystore mytruststore.jks
  1. Create a client keystore with alias jmx:
keytool -genkeypair -alias jmx -keyalg RSA -validity 3600 -keystore clientkeystore.jks
  1. Connect with 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

MonitorHTTP.Listen

   
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.

Accessing the HTTP Monitoring Service

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>

Available Stats

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.).

XML and JSON Output

Append view=xml or view=json:

http://push.example.com:4000/stats?username=admin&password=pass&view=xml

Filters

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

Secure HTTP Monitoring

Enable encryption:

MonitorHTTP.Encryption = true

Use HTTPS:

https://push.example.com:4000/stats?username=user&password=pass

MonitorHTTP.Authentication

   
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.

MonitorHTTP.Encryption

   
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.

MonitorPrometheus.Listen

   
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.

MonitorPrometheus.Authentication

   
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.

MonitorPrometheus.Encryption

   
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.

LogFolder

   
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

LogLevel

   
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)

LogRotateLimit

   
Description Maximum size of a log file before rotation
Default value 10 MB
Required parameter Optional

Accepted units:

  • KB for kilobytes
  • MB for megabytes
  • GB for gigabytes

When a log file exceeds this size, it is rotated. Old log files are retained up to the number specified by LogRotateFileCount.


LogRotateTime

   
Description Time interval after which a new log file is created
Default value No default value
Required parameter Optional

Time units:

  • m for minutes
  • h for hours
  • D for days
  • W for weeks
  • M for months
  • Y for years

Examples:

LogRotateTime = 1 D    # Rotate logs daily
LogRotateTime = 4 h    # Rotate logs every 4 hours

Takes precedence over LogRotateLimit.


LogRotateFileCount

   
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.

DocumentRoot

   
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.

Entitlement

   
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 allows any client to subscribe to and publish on any subject.
  • Basic allows any client to subscribe to any subject. However, publication is allowed only from the clients which authenticate with the token defined by the parameter EntitlementAllowToken.
  • JWT allows clients to subscribe and publish based on JWT tokens using Kafkorama JWT Authorization Add-on. To start using JWT authorization with Kafkorama Gateway, please refer to JWT Authorization add-on documentation.
  • Custom allows you to define your own entitlement rules. You can use the Server Extensions API to build an extension for Kafkorama Gateway to authorize users to subscribe to or publish on certain subjects.
  • Portal allows you to define your own entitlement using Kafkorama Portal. See also the parameters Portal.Url and Portal.Password.

EntitlementAllowToken

   
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.

Portal.Url

   
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.

Portal.Password

   
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.

© 2025 MigratoryData. All rights reserved.