このコンテンツは選択した言語では利用できません。

Chapter 7. MQ Telemetry Transport(MQTT) Protocol


Abstract

MQTT is a machine-to-machine (M2M)/"Internet of Things" connectivity protocol. It was designed as a lightweight publish/subscribe messaging transport.

URI syntax

Example 7.1, “MQTT URI” shows the syntax for an MQTT connection.

Example 7.1. MQTT URI

mqtt://Host:[Port]?transportOptions
An NIO URI has the syntax shown in Example 7.2, “Syntax for MQTT+NIO Connection”.

Example 7.2. Syntax for MQTT+NIO Connection

mqtt+nio://Host[:Port]?transportOptions
A secure MQTT URI has the syntax shown in Example 7.3, “Syntax for an MQTT SSL Connection”.

Example 7.3. Syntax for an MQTT SSL Connection

mqtt+ssl://Host[:Port]?transportOptions
A secure MQTT+NIO URI has the syntax shown in Example 7.4, “Syntax for a MQTT+NIO SSL Connection”.

Example 7.4. Syntax for a MQTT+NIO SSL Connection

mqtt+nio+ssl://Host[:Port]?transportOptions

Transport options

The MQTT protocol supports the following transport options:
Table 7.1. MQTT Transport Options
PropertyDefaultDescription
transport.defaultKeepAlive0
Specifies, in milliseconds, the broker will allow a connection to be silent before it is closed. If a client specifies a keep-alive duration, this setting is ignored. This option is set in the uri attribute of a broker's transportConnector element.
jms.* All the properties with this prefix are used to configure client connections to a broker. See Appendix B, Client Connection Options for more information.

SSL transport options

In addition to the options supported by the non-secure MQTT transports, the SSL transport also supports the options for configuring the SSLServerSocket created for the connection. These options are listed in Table 2.1, “SSL Transport Options”.
Warning
If you are planning to enable SSL/TLS security, you must ensure that you explicitly disable the SSLv3 protocol, in order to safeguard against the Poodle vulnerability (CVE-2014-3566). For more details, see Disabling SSLv3 in JBoss Fuse 6.x and JBoss A-MQ 6.x.

Configuring broker SSL options

On the broker side, you must specify an SSL transport option using the syntax transport.OptionName. For example, to enable an MQTT SSL port on a broker, you would add the following transport element:
<transportConnector name="mqttssl" uri="mqtt+ssl://localhost:61617?transport.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2" />
Tip
Remember, if you are specifying more than one option in the context of XML, you need to escape the ampersand, &, between options as &amp;.

Configuring client SSL options

On the client side, you must specify an SSL transport option using the syntax socket.OptionName. For example, to connect to a MQTT SSL port, you would use a URL like the following:
mqtt+ssl://localhost:61617?socket.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.