MQTT 3.1.1 broker (Moquette)
The Moquette MQTT broker component (aws.greengrass.clientdevices.mqtt.Moquette
) handles MQTT messages
between client devices and a Greengrass core device. This component provides a modified version of the
Moquette MQTT broker
This broker implements the MQTT 3.1.1 protocol. It includes support for QoS 0, QoS 1, QoS 2 retained messages, last will messages, and persistent sessions.
Note
Client devices are local IoT devices that connect to a Greengrass core device to send MQTT messages and data to process. For more information, see Interact with local IoT devices.
Versions
This component has the following versions:
-
2.3.x
-
2.2.x
-
2.1.x
-
2.0.x
Type
This component is a plugin component
(aws.greengrass.plugin
). The Greengrass
nucleus runs this component in the same Java Virtual Machine (JVM) as the nucleus. The
nucleus restarts when you change this component's version on the core device.
This component uses the same log file as the Greengrass nucleus. For more information, see Monitor Amazon IoT Greengrass logs.
For more information, see Component types.
Operating system
This component can be installed on core devices that run the following operating systems:
Linux
Windows
Requirements
This component has the following requirements:
-
The core device must be able to accept connections on the port where the MQTT broker operates. This component runs the MQTT broker on port 8883 by default. You can specify a different port when you configure this component.
If you specify a different port, and you use the MQTT bridge component to relay MQTT messages to other brokers, you must use MQTT bridge v2.1.0 or later. Configure it to use the port where the MQTT broker operates.
If you specify a different port, and you use the IP detector component to manage MQTT broker endpoints, you must use IP detector v2.1.0 or later. Configure it to report the port where the MQTT broker operates.
-
The Moquette MQTT broker component is supported to run in a VPC.
Dependencies
When you deploy a component, Amazon IoT Greengrass also deploys compatible versions of its dependencies. This means that you must meet the requirements for the component and all of its dependencies to successfully deploy the component. This section lists the dependencies for the released versions of this component and the semantic version constraints that define the component versions for each dependency. You can also view the dependencies for each version of the component in the Amazon IoT Greengrass console
For more information about component dependencies, see the component recipe reference.
Configuration
This component provides the following configuration parameters that you can customize when you deploy the component.
moquette
-
(Optional) The Moquette MQTT broker
configuration to use. You can configure a subset of Moqeutte configuration options in this component. For more information, see the inline comments in the Moquette configuration file . This object contains the following information:
ssl_port
-
(Optional) The port where the MQTT broker operates.
Note
If you specify a different port, and you use the MQTT bridge component to relay MQTT messages to other brokers, you must use MQTT bridge v2.1.0 or later. Configure it to use the port where the MQTT broker operates.
If you specify a different port, and you use the IP detector component to manage MQTT broker endpoints, you must use IP detector v2.1.0 or later. Configure it to report the port where the MQTT broker operates.
Default:
8883
host
-
(Optional) The interface where the MQTT broker binds. For example, you might change this parameter so that the MQTT broker binds only to a specific local network.
Default:
0.0.0.0
(binds to all network interfaces)
- startupTimeoutSeconds
-
(Optional) The maximum of time in seconds for the component to start. The component's state changes to
BROKEN
if it exceeds this timeout.Default:
120
Example: Configuration merge update
The following example configuration specifies to operate the MQTT broker on port 443.
{ "moquette": { "ssl_port": "443" } }
Local log file
This component uses the same log file as the Greengrass nucleus component.
To view this component's logs
-
Run the following command on the core device to view this component's log file in real time. Replace
or/greengrass/v2
C:\greengrass\v2
with the path to the Amazon IoT Greengrass root folder.
Changelog
The following table describes the changes in each version of the component.
Version |
Changes |
---|---|
2.3.7 |
Version updated for client device auth version 2.5.0 release. |
2.3.6 |
|
2.3.5 |
|
2.3.4 |
|
2.3.3 |
|
2.3.2 |
Version updated for client device auth version 2.4.0 release. |
2.3.1 |
|
2.3.0 |
Adds support for certificate chains. |
2.2.0 |
Version updated for client device auth version 2.2.0 release. |
2.1.0 |
|
2.0.2 |
|
2.0.1 |
Version updated for Greengrass nucleus version 2.4.0 release. |
2.0.0 |
Initial version. |