- Newest
- Most votes
- Most comments
The behavior you're describing is unusual and not typical for AWS IoT Core or Greengrass MQTT communication. However, there are a few potential explanations and areas to investigate:
-
Client ID conflicts: If multiple devices or connections are using the same MQTT client ID, it can cause unexpected behavior. When a new connection is established using a client ID that's already in use, the AWS IoT message broker drops the old connection to allow the new one. This could potentially lead to message duplication or persistence issues.
-
MQTT bridge configuration: The Greengrass MQTT bridge component relays messages between client devices, local Greengrass publish/subscribe, and AWS IoT Core. It uses QoS 1 to publish and subscribe to AWS IoT Core, even when a client device uses QoS 0 locally. This could introduce some additional latency or potential for message duplication, but shouldn't cause the extreme behavior you're seeing.
-
Persistent sessions: While you mentioned that AWS Things are not configured for persistent sessions, it's worth double-checking the Greengrass Core configuration. Persistent sessions can cause messages to be stored and retransmitted, which could explain some of the behavior you're seeing.
-
Message retention: Check if any message retention policies are configured on the topics in question. Retained messages in MQTT can cause messages to persist even after the publishing client disconnects.
-
Cloud-side caching or processing: There might be some unexpected caching or processing happening on the AWS IoT Core side that's causing messages to be stored and retransmitted.
To troubleshoot this issue:
- Ensure all devices and connections use unique client IDs.
- Review your MQTT bridge configuration in Greengrass.
- Double-check session persistence settings for both AWS Things and Greengrass Cores.
- Investigate any message retention policies on your topics.
- Monitor your device connections and disconnections carefully to see if there are any unexpected patterns.
- Consider implementing message sequencing or timestamps in your payloads to help track message order and identify duplicates.
If the issue persists after checking these areas, it would be advisable to contact AWS support for further investigation, as this behavior is not normal for the AWS IoT Core MQTT broker.
Sources
MQTT multiple subscribers to one topic not working | AWS re:Post
MQTT bridge - AWS IoT Greengrass
Relevant content
- asked 2 years ago
- asked 3 years ago
- asked 7 months ago