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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠