\uD83E\uDD14 Problem
After upgrading to HiveMQ 4.17 there is a warning
WARN - HiveMQ Enterprise Extension for Kafka: The configuration file is placed at the legacy location '/opt/hivemq/extensions/hivemq-kafka-extension/kafka-configuration.xml'. Please move the configuration file to the new location '/opt/hivemq/extensions/hivemq-kafka-extension/conf/config.xml'. Support for the legacy location will be removed in a future release.
\uD83C\uDF31 Solution
Starting with HiveMQ 4.15.0, the configuration for the HiveMQ Kafka Extension is located in HIVEMQ_HOME/extensions/hivemq-kafka-extension/conf/config.xml
. Support for the previous location HIVEMQ_HOME/extensions/hivemq-kafka-extension/kafka-configuration.xml
will be removed in a future release.
In version HiveMQ 4.17, location HIVEMQ_HOME/extensions/hivemq-kafka-extension/kafka-configuration.xml
is still supported. This is why you only see a warning in the log (WARN), rather than an error. For future versions, move the configuration from HIVEMQ_HOME/extensions/hivemq-kafka-extension/kafka-configuration.xml
to HIVEMQ_HOME/extensions/hivemq-kafka-extension/conf/config.xml
.
Add a Kafka extension configuration file to the HiveMQ cluster in the following way:
Create a config map from the configuration file:
kubectl create configmap 'kafka-config' --from-file='kafka-configuration.xml'
Update the values.yaml file of the hivemq-operator and specify that the Kafka configuration file is taken from the config map:
hivemq: ... extensions: - name: hivemq-kafka-extension extensionUri: preinstalled enabled: true configMap: kafka-config ...
The content of the kafka-config configMap will be mounted by the HiveMQ Operator to directory /conf-override/extensions/hivemq-kafka-extension/<kafka-configuration.xml>. To copy the configuration file to the desired location, add the following initialization script:
hivemq: ... extensions: - name: hivemq-kafka-extension extensionUri: preinstalled enabled: true configMap: kafka-config initialization: | [[ -e /conf-override/extensions/hivemq-kafka-extension/kafka-configuration.xml ]] && rm -f $(pwd)/conf/config.xml && cp -s /conf-override/extensions/hivemq-kafka-extension/kafka-configuration.xml $(pwd)/conf/config.xml
Reinstall the HiveMQ Helm chart:
helm uninstall <releasename>; sleep 20; helm upgrade <releasename> --install hivemq/hivemq-operator \ --values path/to/values.yaml
Verify the content of the Kaka extension’s config.xml on the HiveMQ pod:
kubectl exec pod/<my hivemq pod> -- cat /opt/hivemq/extensions/hivemq-kafka-extension/conf/config.xml