The WSO2 IoT Server is packaged with a broker profile to handle message brokering. The following section provides an alternative to using the broker profile and guides you through using WSO2 Message Broker (WSO2 MB) to act as the MQTT broker with the WSO2 IoT Server device management profile. This is useful in a production environment where a WSO2 MB node is already in use and you want to use the WSO2 IoT Server device management profile with it.
Follow the steps below to configure WSO2 IoT Server with WSO2 MB 3.2.0 for brokering.
broker-feature-installation.xmlfile and place it inside the
<MB_HOME>on the terminal and execute the following command. This will install the required features to the WSO2 IoT Server pack.
xmlfile found in the
<MB_HOME>/repository/conffolder and do the following:
Replace the configuration found under the
<security>tag with the following configuration:
This configuration configures the properties and classes required to allow devices to publish to the MQTT server.
- Ensure that the
hostURLproperty points to the key manager token endpoint.
- Ensure that the
deviceMgtServerURLpoints to the gateway endpoint.
If you have changed the default port of the broker profile, update the environment variables in following files with the correct endpoint.
If you are a Window's user, environment variables needs to be changed in the
.batfiles listed below.
The default keystore used in WSO2 IoT Server has been updated from version 3.1.0 onwards. Since all servers must use the same certificate, do the following to update the keystores in WSO2 Message Broker 3.2.0.
Navigate to the
<IoTS_HOME>/repository/resources/securitydirectory and copy the
Get a back of the files
wso2carbon.jksfiles in the
<MB_HOME>/repository/resources/securityfolder by pasting the files copied in step 5.a.