Skip to content

Commit

Permalink
fix(platform/messaging): receive latest retained message per topic in…
Browse files Browse the repository at this point in the history
… wildcard subscription

Previously, a wildcard subscription received only the latest retained message that matched the subscription, even if the messages were published to different topics. Now the subscription receives the latest retained message per matching topic.

### Example
Imagine having the following retained messages and subscribing to 'myhome/:room/temperature'.
- 'myhome/livingroom/temperature': 22°C (message 1)
- 'myhome/kitchen/temperature': 21°C (message 2)
- 'myhome/kitchen/temperature': 21.5°C (message 3)
- 'myhome/diningroom/temperature': 20.5°C (message 4)

The subscription now receives the following messages:
- 'myhome/livingroom/temperature': 22°C (message 1)
- 'myhome/kitchen/temperature': 21.5°C (message 3)
- 'myhome/diningroom/temperature': 20.5°C (message 4)

Previously, only the following message was received:
- 'myhome/diningroom/temperature': 20.5°C (message 4)
  • Loading branch information
danielwiehl authored and Marcarrian committed Nov 8, 2022
1 parent 3909ba3 commit b578317
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 296 deletions.
Loading

0 comments on commit b578317

Please sign in to comment.