Configuration
This page describes all configuration options available for Axon Server Proxy.
Configuration file
Configuration is provided via a proxy.properties file placed in the working directory. Alternatively, any property can be set via environment variables (see Environment variables). Environment variables take precedence over values in proxy.properties.
There are no command-line property overrides. Configuration comes exclusively from proxy.properties or environment variables.
Required configuration
These configuration options must be specified for the proxy to function.
Axon Server nodes
proxy.servers-
Comma-separated list of Axon Server admin node addresses. Each address can be in the format
hostnameorhostname:port. If no port is specified, the default port 8124 is used.# Single server proxy.servers=axonserver.local # Single server with custom port proxy.servers=axonserver.local:9124 # Multiple servers (HA setup) proxy.servers=axonserver1.local:8124,axonserver2.local:8124,axonserver3.local:8124 # Multiple servers with mixed ports proxy.servers=axonserver1.local:8124,axonserver2.local,axonserver3.local:9124These should be the admin nodes of your Axon Server cluster, not regular nodes.
Basic configuration
Message size limits
proxy.maxMessageSize-
Maximum message size that the proxy will accept and forward. Supports standard size formats (for example,
10MB,512KB,1GB). If not specified or set to0, the gRPC default is used (no limit).# Accept messages up to 10 megabytes proxy.maxMessageSize=10MB # Accept messages up to 512 kilobytes proxy.maxMessageSize=512KBThis value cannot exceed 2 GB due to gRPC limitations. Ensure this value is aligned with your Axon Server configuration and application requirements.
Disconnect timeout
proxy.disconnectTimeout-
Number of seconds to wait for graceful shutdown of channels when closing connections. Specified as a plain integer. Default is
10.# Default timeout proxy.disconnectTimeout=10 # Longer timeout for graceful shutdown proxy.disconnectTimeout=30After this timeout, channels are forcibly closed if they haven’t terminated gracefully.
TLS configuration
The proxy supports TLS in two independently configurable contexts:
-
Client-facing TLS: Secure connections from applications to the proxy
-
Backend TLS: Secure connections from the proxy to Axon Server
| TLS support exists so the proxy can operate in environments that require it, not as a primary reason to introduce the proxy. If your applications already connect directly to Axon Server with TLS, the proxy does not simplify that. The main benefit is when the two sides have different requirements. For example, applications in an external network requiring TLS, while the proxy and Axon Server share a trusted internal network where TLS is unnecessary. |
Client-facing TLS (incoming)
Configure TLS for connections from applications to the proxy.
proxy.tlsEnabled-
Enable TLS for incoming connections. Default is
false.proxy.tlsEnabled=true proxy.tlsKey-
Path to the private key file for TLS. Required when
proxy.tlsEnabled=true.proxy.tlsKey=/etc/axon-proxy/tls/server-key.pemThe file should be in PEM format.
proxy.tlsCert-
Path to the certificate chain file for TLS. Required when
proxy.tlsEnabled=true.proxy.tlsCert=/etc/axon-proxy/tls/server-cert.pemThe file should contain the certificate and any intermediate CA certificates in PEM format.
Backend TLS (outgoing)
Configure TLS for connections from the proxy to Axon Server.
proxy.internalTlsEnabled-
Enable TLS for connections to Axon Server backend nodes. Default is
false.proxy.internalTlsEnabled=true proxy.internalTrustCerts-
Path to the file containing trusted CA certificates for backend connections. Required when
proxy.internalTlsEnabled=true.proxy.internalTrustCerts=/etc/axon-proxy/tls/ca-cert.pemThe file should contain one or more CA certificates in PEM format.
proxy.trustManagerVerification-
Controls the level of certificate verification for backend connections. Valid values:
-
CERTIFICATE_AND_HOST_NAME_VERIFICATION(default): Full verification including hostname -
CERTIFICATE_ONLY_VERIFICATION: Verify certificate validity but skip hostname check -
INSECURELY_SKIP_ALL_VERIFICATION: Skip all verification (not recommended for production)# Default - full verification proxy.trustManagerVerification=CERTIFICATE_AND_HOST_NAME_VERIFICATION # Certificate only proxy.trustManagerVerification=CERTIFICATE_ONLY_VERIFICATION # Skip verification (development only!) proxy.trustManagerVerification=INSECURELY_SKIP_ALL_VERIFICATIONUsing INSECURELY_SKIP_ALL_VERIFICATIONdisables all certificate validation and should only be used in development environments.
-
Monitoring endpoint configuration
The proxy includes an HTTP monitoring endpoint that exposes health, metrics, and connection endpoints.
proxy.monitoring.enabled-
Enable or disable the monitoring endpoint entirely. Default is
true.proxy.monitoring.enabled=false proxy.monitoring.port-
The port on which the monitoring HTTP endpoint listens. Default is
8080.proxy.monitoring.port=9090 proxy.monitoring.host-
The bind address for the monitoring HTTP endpoint. Default is
0.0.0.0(all interfaces). Set to127.0.0.1to restrict access to the loopback interface only.# Restrict to localhost only proxy.monitoring.host=127.0.0.1
See Monitoring for details on the available monitoring endpoints.
Logging configuration
The proxy uses SLF4J with Logback for logging. Log levels and appenders are configured via a logback.xml file, not via proxy.properties.
The default configuration writes colorized, timestamped output to the console.
To override the logging configuration:
-
Place a
logback.xmlfile in the working directory (it will be detected automatically at startup), or -
Pass the path explicitly as a JVM system property:
java -Dlogback.configurationFile=/etc/axon-proxy/logback.xml -jar axon-server-proxy.jar
Example logback.xml with file output and rolling policy:
<configuration>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>/var/log/axon-proxy/proxy.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>/var/log/axon-proxy/proxy-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<maxFileSize>100MB</maxFileSize>
<maxHistory>10</maxHistory>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="FILE"/>
</root>
<logger name="io.axoniq.proxy" level="INFO"/>
</configuration>
Complete configuration examples
Production configuration (no TLS)
# Server configuration
proxy.servers=axonserver1:8124,axonserver2:8124,axonserver3:8124
proxy.port=8124
# Message size limit
proxy.maxMessageSize=10MB
# Disconnect timeout (seconds)
proxy.disconnectTimeout=30
# Monitoring endpoint
proxy.monitoring.port=8080
proxy.monitoring.host=127.0.0.1
Production configuration (full TLS)
# Server configuration
proxy.servers=axonserver1:8124,axonserver2:8124,axonserver3:8124
proxy.port=8124
# Message configuration
proxy.maxMessageSize=10MB
proxy.disconnectTimeout=30
# Client-facing TLS
proxy.tlsEnabled=true
proxy.tlsKey=/etc/axon-proxy/tls/server-key.pem
proxy.tlsCert=/etc/axon-proxy/tls/server-cert.pem
# Backend TLS
proxy.internalTlsEnabled=true
proxy.internalTrustCerts=/etc/axon-proxy/tls/ca-cert.pem
proxy.trustManagerVerification=CERTIFICATE_AND_HOST_NAME_VERIFICATION
# Monitoring endpoint
proxy.monitoring.port=8080
proxy.monitoring.host=127.0.0.1
Environment variables
All configuration properties can also be set via environment variables. Environment variables take precedence over values in proxy.properties.
The naming rule is: replace dots with underscores, insert an underscore before each uppercase letter in camelCase names, and uppercase the entire result.
For example: proxy.tlsEnabled becomes PROXY_TLS_ENABLED.
| Property | Environment variable |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example:
export PROXY_SERVERS=axonserver1:8124,axonserver2:8124
export PROXY_PORT=8124
export PROXY_TLS_ENABLED=true
Configuration validation
The proxy validates configuration on startup and will fail to start if:
-
proxy.serversis not specified or empty -
proxy.portis not specified -
proxy.tlsEnabled=truebutproxy.tlsKeyorproxy.tlsCertis missing -
proxy.internalTlsEnabled=truebutproxy.internalTrustCertsis missing -
proxy.maxMessageSizeexceeds 2 GB -
proxy.disconnectTimeoutis negative