Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This knowledge base article provides a guide for integrating declared-shared-subscriptions.xml into a HiveMQ deployment on Kubernetes without overriding the StatefulSet. The article outlines step-by-step instructions and necessary configurations to ensure smooth integration of the declared-shared-subscriptions.xml file into the HiveMQ configuration.

Prerequisites:

This article is created using the following:

  • kubernetes api 1.28

  • helm 3.1+

  • HiveMQ 4.28.0

  • hivemq/hivemq-platform-operator 0.2.5 1.3.0

  • hivemq/hivemq-platform 0.2.14 4.28.0

Instructions

  1. Update values.yaml Configuration: Open the hivemq-platform’s values.yaml file and verify/update the following configurations:

    Code Block
    languageyaml
    config: 
      create: false 
      name: "my-config" 
      overrideHiveMQConfig: "" 
      overrideStatefulSet: ""
    • create: false: Disable the creation of the default HiveMQ config.xml file.

    • name: "my-config": Specify a custom name for the ConfigMap.

    • overrideHiveMQConfig: "" and overrideStatefulSet: "": Ensure that HiveMQ config and StatefulSet are is not overridden here.

  2. Create Custom ConfigMap: Use the provided manifest cm-my-config.yaml to create a new ConfigMap named my-config:

    Code Block
    languagebash
    kubectl apply -f cm-my-config.yaml

    Deploy Updated HiveMQ: Deploy the updated HiveMQ platform with the modified values from the values.yaml file.

  3. Verify Configuration: Confirm the presence of declared-shared-subscriptions.xml in the /opt/hivemq/conf-k8s/ directory within the HiveMQ pods:

    Code Block
    languagebash
    kubectl exec pods/my-hivemq-0 -c hivemq -- \
      ls -la conf-k8s/declared-shared-subscriptions.xml
  4. Check hivemq.log: Ensure that the hivemq.log records the inclusion of Declared shared subscriptions:

    Code Block
    languagebash
    kubectl exec pods/my-hivemq-0 -c hivemq -- \
      grep -i declared log/hivemq.log
    Code Block
    languagetext
    INFO - Declared shared subscriptions from file /opt/hivemq/conf-k8s/declared-shared-subscriptions.xml

    Future Configuration Updates: For any future configuration updates, modify the cm-my-config.yaml manifest and apply the changes using:

    Code Block
    languagebash
    kubectl apply -f cm-my-config.yaml

    This ensures that alterations to the ConfigMap are recognized, and updates are applied in a rolling manner by the operator.

Info

By following these outlined steps, users can seamlessly integrate declared-shared-subscriptions.xml into their HiveMQ deployment on Kubernetes, ensuring efficient management and operation of MQTT broker configurations.

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@957
sortmodified
showSpacefalse
reversetrue
typepage
labelskb-how-to-article
cqllabel = "kb-how-to-article" and type = "page" and space = "KB"