MQTT QOS 1 publish ACK in greengrass v2 components

0

Is there any way for greengrass v2 components using aws.greengrass.ipc.mqttproxy to know if a QOS_1 publish has been acknowledged ? Or some other mechanism to make absolutely sure that the QOS_1 publish has finally reached AWS IoT Core ? Also, is there any way for that components to know the status of the MQTT connection to AWS Iot Core (connected/disconnected)?

Greg
질문됨 일 년 전243회 조회
1개 답변
0
수락된 답변

Hello,

The only way to achieve what you're looking for is for the ultimate destination to send a response back to acknowledge receipt. For example, sending an MQTT message on /send from the device, then a lambda in the cloud sends another message on /acknowledge which the application on the device has subscribed to. This validates that the message is truly received by your cloud application and the device side can forget about the message.

Cheers, Michael

AWS
전문가
답변함 일 년 전
profile picture
전문가
검토됨 2달 전
  • Thanks Michel, I agree that in the end this is the only way to be absolutely sure. I have seen that when the MQTT connection is lost greengrass shows in the log [INFO] (Thread-5) com.aws.greengrass.mqttclient.AwsIotMqttClient: Connection interrupted while when the connection returns it shows [INFO] (Thread-5) com.aws.greengrass.mqttclient.AwsIotMqttClient: Connection resumed. Do you know if there is any way for a component to know these circumstances apart from monitoring the greengrass log ? Is there any way for a component to have an IPC subscription that informs it whether the MQTT connection is active or not ?

  • Sorry, but no, those disconnect/connect events are not exposed in any way for you to use.

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

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

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

관련 콘텐츠