-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Describe the bug
I am running MQTT bridge on GG core, configured to forward messages between LocalMqtt to IotCore and vice versa. The bridge does not work with MQTT retained messages. When local client device publishes a retained MQTT message on a topic, forwarded by bridge to IotCore - new subscription of IotCore does not receive the retained message.
To Reproduce
- Run bridge with following config:
{
"mqttTopicMapping": {
"ClientDevicesToCloud": {
"topic": "from_local/#",
"source": "LocalMqtt",
"target": "IotCore",
},
"CloudToClientDevices": {
"topic": "from_cloud/#",
"source": "IotCore",
"target": "LocalMqtt",
},
}
}
- Publish a MQTT retained message from local client on topic
from_local/test. - Go to AWS Iot Core > MQTT test client.
- Subscribe on topic
from_local/test. - Retained message should appear when you subscribe.
- Or retained message should also appear under Retained messages page on AWS IoT Core.
Expected behavior
A local client device publishes a retained MQTT message on a topic, forwarded by bridge to IotCore. I expect that when a new client on AWS IoT Core subscribes on that topic, it receives the retained message.
Actual behavior
When a new client subscribes on topic, it does not receive the retained MQTT message.
Environment
- OS: Amazon Linux 2 (Linux version 4.14.287-215.504.amzn2.x86_64 )
- Nucleus version: 2.7.0
- MQTT Bridge version: 2.2.2
- aws.greengrass.clientdevices.mqtt.Moquette : 2.2.0
Additional context
We use a specific standard VDA5050 for AGVs - Automated Guided Vehicles (client devices) that requires messages on some specific topics to be sent with RETAINED flag set to true. The services running on AWS cloud following that standard must follow the standard and should be able to receive RETAINED messages sent by local client devices (that communicate through GG core & bridge).