Versions Compared

Key

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

WSO2 Message Broker (WSO2 MB) uses two transport protocols for the purpose of brokering messages between publishers and subscribers. These protocols are the Advanced Message Queueing Protocol (AMQP) and the Message Queueing and Telemetry Transport (MQTT).

...

You can configure the secure SSL connection , as shown in for the AMQP transport using the following extract of the of the broker.xml file:. See Enabling SSL Support in the Broker for information.

Code Block
languagexml
<amqp enabled="true">
	................
	<sslConnection enabled="true" port="8672">
    	<keyStore>
        	<location>repository/resources/security/wso2carbon.jks</location>
            <password>wso2carbon</password>
            <certType>SunX509</certType>
    	</keyStore>
        <trustStore>
            <location>repository/resources/security/client-truststore.jks</location>
            <password>wso2carbon</password>
            <certType>SunX509</certType>
        </trustStore>
    </sslConnection>
    ............
</amqp>

As shown above, sslConnection specifies the basic configurations relating to the SSL connection.

...

The <keyStore> and <trustStore> element specifies the details of the keystore and trustore used. Note that, by default, the keystore configuration points to the default keystore and truststore that is shipped with the product. The location, password and certType elements are explained below.

...

The location where the keystoreused for securing SSL connections is stored. By defaultthis is the default keystore(wso2carbon.jks) that is shipped with WSO2 MB.

Note

Note that this should always be a keystore created for the super tenant. Find out more about setting up keystores for your MB server.

...

 

 

 

Related Parameters

Once you have enabled the AMQP transport, you can update the following related parameters as required.

...

Message Queueing and Telemetry Transport

The Message Queueing and Telemetry Transport (MQTT) is a lightweight, broker-based publish/subscribe messaging protocol, which enables an extremely lightweight publish/subscribe messaging model. WSO2 MB 3.0.0 and later versions fully support MQTT version 3.1.0, and partially supports version 3.1.1.

The MQTT protocol allows a message to be sent to a topic based on three levels of QoS (Quality of Service) as explained below.

...

Code Block
languagexml
<mqtt enabled="true">
	<port>1883</port>
	<sslPort>8883</sslPort> <!-- put proper default ssl port -->
    <inboundBufferSize>32768</inboundBufferSize>
    <deliveryBufferSize>32768</deliveryBufferSize>
    <security>
             <authentication>OPTIONAL</authentication>
             <authenticator>org.wso2.carbon.andes.authentication.andes.CarbonBasedMQTTAuthenticator</authenticator>
    </security>
</mqtt>

Related Parameters

...

If the value for this

...

parameter is true, the MQTT transport is enabled and the MQTT protocol will be applied to messages that are sent to the specified listening port.

...

 The listening port for the MQTT transport is 1883. The MQTT broker will be initialized with the specified port by default. This value would be incremented based on the offset specified in the carbon.xml.

...

Configuring the SSL connection

You can configure the secure SSL connection for the MQTT transport using the following extract of the broker.xml file. See Enabling SSL Support in the Broker for information.

Code Block
languagexml
<mqtt enabled="true">
	................
	<sslConnection enabled="true" port="8883">
    	<keyStore>
        	<location>repository/resources/security/wso2carbon.jks</location>
            <password>wso2carbon</password>
            <certType>SunX509</certType>
    	</keyStore>
        <trustStore>
            <location>repository/resources/security/client-truststore.jks</location>
            <password>wso2carbon</password>
            <certType>SunX509</certType>
        </trustStore>
    </sslConnection>
    ............
</mqtt>

Related Parameters

Once you have enabled the MQTT transport, you can update the following related parameters as required.

Parameter NameDescriptionDefault Value
sslPortThe listening SSL port for the MQTT transport. The MQTT secure socket will be initialized with the specified port by default.8883

...