Choose an MQTT broker - Amazon IoT Greengrass
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Choose an MQTT broker

Amazon IoT Greengrass provides options for you to choose which local MQTT broker to run on your core devices. Client devices connect to the MQTT broker that runs on a core device, so choose an MQTT broker that is compatible with the client devices that you want to connect.


We recommend that you deploy only one MQTT broker component. The MQTT bridge and IP detector components work with only one MQTT broker component at a time. If you deploy multiple MQTT broker components, you must configure them to use different ports.

You can choose from the following MQTT brokers:

  • MQTT 3.1.1 broker (Moquette)aws.greengrass.clientdevices.mqtt.Moquette

    Choose this option for a lightweight MQTT broker that is compliant with the MQTT 3.1.1 standard. The Amazon IoT Core MQTT broker and Amazon IoT Device SDK are also compliant with the MQTT 3.1.1 standard, so you can use these features to create an application that uses MQTT 3.1.1 across your devices and the Amazon Web Services Cloud.

  • MQTT 5 broker (EMQX)aws.greengrass.clientdevices.mqtt.EMQX

    Choose this option to use MQTT 5 features in communication between core devices and client devices. This component uses more resources than the Moquette MQTT 3.1.1 broker, and on Linux core devices, it requires Docker.

    MQTT 5 is backward-compatible with MQTT 3.1.1, so you can connect client devices that use MQTT 3.1.1 to this broker. If you run the Moquette MQTT 3.1.1 broker, you can replace it with the EMQX MQTT 5 broker, and client devices can continue to connect and operate as usual.

  • Implement a custom broker

    Choose this option to create a custom local broker component to communicate with client devices. You can create a custom local broker that uses a protocol other than MQTT. Amazon IoT Greengrass provides a component SDK that you can use to authenticate and authorize client devices. For more information, see Use the Amazon IoT Device SDK to communicate with the Greengrass nucleus, other components, and Amazon IoT Core and Authenticate and authorize client devices.