Others

Server

Kafka admin / producer / consumer default properties

  • akhq.clients-defaults.{{admin|producer|consumer}}.properties: default configuration for admin producer or consumer. All properties from Kafka documentationopen in new window is available.

Micronaut configuration

Since AKHQ is based on Micronautopen in new window, you can customize configurations (server port, ssl, ...) with Micronaut configurationopen in new window. More information can be found on Micronaut documentationopen in new window

Activating SSL

When using HTTPS for communication, Micronaut will need to get the certificate within Netty. This uses classes of the java.base package which are no longer activated inside the JDK we use. The configuration at the bottom needs to be extended by this environment variable:

JDK_JAVA_OPTIONS: --add-exports\=java.base/sun.security.x509\=ALL-UNNAMED
micronaut:
  server:
    ssl:
      enabled: true
      build-self-signed: true

JSON Logging

In order to configure AKHQ to output log in JSON format, a logback configuration needs to be provided, e.g. logback.xml

<configuration>
  <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
    <encoder class="ch.qos.logback.classic.encoder.JsonEncoder">
    </encoder>
  </appender>

  <root level="debug">
    <appender-ref ref="stdout"/>
  </root>
</configuration>

This file then needs to be mounted to /app/logback.xml and referenced in JAVA_OPTS via -Dlogback.configurationFile=/app/logback.xml (see docker for more information).