greengrass local mqtt brokers advice

0

Hello,

I understand that i can use (and am using) the base greengrass install to publish and subscribe to local mqtt topics. To publish and subscribe i need to use the aws-iot-sdk (c++) library.

  • is it possible to use a standard mqtt library to talk to this internal greengrass broker as well ? or do i need to use the aws-iot-sdk ?

I would like to use 1 broker to let all my greengrass components and external tablets talk to each other, so i would like to use it as a 'message bus'

I also found a aws.greengrass.clientdevices.mqtt.Moquette broker (which i assume is like mosquitto) that can be installed on a greengrass device. I assume i can talk to this broker with any mqtt client library (even the libmosquitto ?)

  • are these assumptions correct ?

how would i make the choice of which broker to use ? the internal greengrass topics or the extra moquette broker ? what is the idea behind having 2 types of brokers ?

kind regards, Tom

clogwog
asked 2 years ago803 views
1 Answer
1
Accepted Answer

Hi Tom,

Greengrass only has a single MQTT broker which is optional, aws.greengrass.clientdevices.mqtt.Moquette. The "internal" broker which I believe you are referring to is accessed using Greengrass IPC calls subscribeToIotCore and publishToIotCore. These calls are IPC calls and are not using the MQTT protocol directly (there is no MQTT broker involved on the local Greengrass device for these calls).

When using the MQTT broker provided by Greengrass which is aws.greengrass.clientdevices.mqtt.Moquette, you can use any MQTT client not just the AWS IoT Device SDK.

You may use the component aws.greengrass.clientdevices.mqtt.Bridge in order to bridge data on topics between IoT Core, local MQTT (Moquette Broker), and Greengrass local pubsub (subscribeToTopic/publishToTopic).

AWS
EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions