Create a file to prevent installing ActiveMQ features on Minion start-up
sudo vi etc/featuresBoot.d/disable-activemq.boot
Add the following lines to disable ActiveMQ features and save the file
!minion-jms
!opennms-core-ipc-rpc-jms
!opennms-core-ipc-sink-camel
!opennms-core-ipc-twin-jms
Create a file to install Kafka features on Minion start-up
sudo vi etc/featuresBoot.d/kafka.boot
Add the following lines to install the remote producer call (RPC), sink, and twin feature for Kafka on Minion start-up and save the file
opennms-core-ipc-rpc-kafka
opennms-core-ipc-sink-kafka
opennms-core-ipc-twin-kafka
Configure the Kafka features and the Minion location via the Karaf shell
ssh -p 8201 admin@localhost
Configure the Minion location
config:edit org.opennms.minion.controller(1)
config:property-set location my-location(2)
config:update(3)
1 Edit the Minion configuration.
2 Replace my-location with a location name that represents the remote location where the Minion is running.
3 Save the configuration.

By default, the Minion generates a unique ID. Provide a human-readable Minion identifier yourself with config:property-set id my-minion-name.

Configure the Kafka endpoints for RPC feature
config:edit org.opennms.core.ipc.rpc.kafka
config:property-set bootstrap.servers my-kafka-ip-1:9092,my-kafka-ip-2:9092(1)
config:update
1 Connect to the specified Kafka nodes and adjust the IPs or FQDNs with the Kafka port (9092) accordingly.
Configure the Kafka endpoints for sink feature
config:edit org.opennms.core.ipc.sink.kafka
config:property-set bootstrap.servers my-kafka-ip-1:9092,my-kafka-ip-2:9092(1)
config:update
1 Connect to the specified Kafka nodes and adjust the IPs or FQDNs with the Kafka port (9092) accordingly.
Configure the Kafka endpoints for twin feature
config:edit org.opennms.core.ipc.twin.kafka
config:property-set bootstrap.servers my-kafka-ip-1:9092,my-kafka-ip-2:9092(1)
config:update
1 Connect to the specified Kafka nodes and adjust the IPs or FQDNs with the Kafka port (9092) accordingly.

If you set more than one Kafka node as bootstrap.servers. the driver attempts to connect to the first entry. If that is successful, the whole broker topology will be discovered and will be known by the client. The other entries are used only if the connection to the first entry fails.

Ensure you use the FQDN or IP for your Kafka nodes as configured as advertised listener.

Exit the Karaf shell with Ctrl+d

Restart the Minion to apply the configuration
sudo systemctl restart minion
Verify the configuration using the health check in the Karaf shell
ssh -p 8201 admin@localhost
Run the health check command
opennms:health-check
Verify all components are configured properly
Verifying the health of the container

Verifying installed bundles              [ Success  ]
Connecting to Kafka from RPC             [ Success  ]
Connecting to Kafka from Sink Producer   [ Success  ]

=> Everything is awesome