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
質問済み 2年前813ビュー
1回答
1
承認された回答

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
エキスパート
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ