hello-nrfcloud / hello-nrfcloud/backend

Replace Message Bridge with nRF Cloud Message Routing

Open
#1,410 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
TypeScript
Stars
4
Forks
1
Avg merge
13h 12m
Merged PRs (30d)
52

Description

The nRF Cloud Message Routing now sends AWS Thingy Shadow documents. This is much more convenient compared to the current implementation which requires the backend to poll the device state regularly.

The webhook now receives a message that is a copy of the `$aws/things//shadow/update/documents` message.

In the example below this was the shadow update: `{"reported": { "foo": "bar" }}`

```json
{
"type": "device.messages",
"messages": [
{
"teamId": "",
"deviceId": "",
"messageId": "251cd7a1-23a4-422d-be14-1aafd209e75b",
"topic": "$aws/things//shadow/update/documents",
"message": {
"previous": {
"state": {
"desired": {
"nrfcloud_mqtt_topic_prefix": "prod//",
"pairing": {
"state": "paired",
"topics": {
"d2c": "prod//m/d//d2c",
"c2d": "prod//m/d//+/r"
}
}
}
},
"metadata": {
"desired": {
"nrfcloud_mqtt_topic_prefix": { "timestamp": 1723215415 },
"pairing": {
"state": { "timestamp": 1723215415 },
"topics": {
"d2c": { "timestamp": 1723215415 },
"c2d": { "timestamp": 1723215415 }
}
}
}
},
"version": 1
},
"current": {
"state": {
"desired": {
"nrfcloud_mqtt_topic_prefix": "prod//",
"pairing": {
"state": "paired",
"topics": {
"d2c": "prod//m/d//d2c",
"c2d": "prod//m/d//+/r"
}
}
},
"reported": { "foo": "bar" }
},
"metadata": {
"desired": {
"nrfcloud_mqtt_topic_prefix": { "timestamp": 1723215415 },
"pairing": {
"state": { "timestamp": 1723215415 },
"topics": {
"d2c": { "timestamp": 1723215415 },
"c2d": { "timestamp": 1723215415 }
}
}
},
"reported": { "foo": { "timestamp": 1749799965 } }
},
"version": 2
},
"timestamp": 1749799965
},
"receivedAt": "2025-06-13T07:32:45.090Z"
}
],
"timestamp": "2025-06-13T07:32:45.145971775Z"
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.