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).
...
The Advance Message Queueing Protocol (AMQP) is a wire-level messaging protocol used by WSO2 MB for message queueing.
Enabling the transport
The The <MB_HOME>/repository/conf/broker.xml
file contains file contains parameters related to configuring the AMQP transport.
Enabling the transport
The transport can be is enabled by default, as shown in the following extract of the broker.xml
file:
Code Block | ||
---|---|---|
| ||
<amqp enabled="true"> <!-- most of the amqp configurations reside in qpid-config.xml since we inherit the qpid messaging model during AMQP.--><defaultConnection enabled="true" port="5672" /> </amqp> |
If the value of this parameter is true
, the AMQP transport is enabled and the AMQP protocol will be applied to messages sent to the specified listening port. The default listening port specified for the AMQP transport is 5672. That is, the AMQP broker will be initialized with this port by default.
Enabling SSL connection
You can configure the secure SSL connection, as shown in the following extract of the broker.xml
file:
Code Block | ||
---|---|---|
| ||
<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> <maximumRedeliveryAttempts>10</maximumRedeliveryAttempts> <allowSharedTopicSubscriptions>false</allowSharedTopicSubscriptions> <allowStrictNameValidation>true</allowStrictNameValidation> </amqp> |
Related Parameters
...
............
</amqp> |
As shown above, the listening SSL port for the specified AMQP transport is 8672 by default. The AMQP security socket will be initialized with this port by default.
...
Related Parameters
Once you have enabled the AMQP transport, you can update the following related parameters as required.
Code Block | ||
---|---|---|
| ||
<amqp enabled="true">
............
<maximumRedeliveryAttempts>10</maximumRedeliveryAttempts>
<allowSharedTopicSubscriptions>false</allowSharedTopicSubscriptions>
<allowStrictNameValidation>true</allowStrictNameValidation>
............
</amqp> |
Parameter Name | Description | Default Value |
---|---|---|
maximumRedeliveryAttempts | The maximum number of times the WSO2 MB should attempt to redeliver a message that has not reached a subscriber. For example, when this value is set to 10, another 10 attempts will be made to deliver the message. The default value can be changed depending on your reliability requirements. | 10 |
allowSharedTopicSubscriptions | If this parameter is true , a durable subscription to a topic can be shared among multiple subscribers. That is, multiple clients can subscribe to a topic in WSO2 MB using the same client ID. Read more about durable subscriptions to topics. | false |
allowStrictNameValidation | If this parameter is true, the queue names and topic names will be validated according to the AMQP specification. When this parameter is set to false , it is possible to use ":" in topic names. | true |
...
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.
...