This documentation is for WSO2 Message Broker 3.1.0. View documentation for the latest release.
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.
Skip to end of metadata
Go to start of metadata

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.

QoS 1 - At Most One - At this level, messages are delivered to subscribers in the most efficient manner. A message is dispatched only once.

QoS 2 - At Least One - At this level, the system will ensure that a message is received by the subscriber at least once. The level of delivery is assured through acknowledged delivery.

QoS 3 - Exactly Once - At this level, the message is delivered only once to its subscriber. This level is also defined as Assured Delivery.

Enabling the transport

The <MB_HOME>/repository/conf/broker.xml file contains parameters related to configuring the MQTT transport. The transport can be enabled as shown in the following extract of the broker.xml file.

<mqtt enabled="true">
	<sslPort>8883</sslPort> <!-- put proper default ssl port -->

Related Parameters

Parameter NameDescriptionDefault Value
enabledIf 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.true
portThe listening port for the MQTT transport. 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.1883
sslPortThe listening SSL port for the MQTT transport. The MQTT secure socket will be initialized with the specified port by default. 8883

Refer the description of the broker.xml file for further details.

  • No labels