Avoid receiving duplicates when publishing same package again #2240
Replies: 2 comments
-
|
Cant you just use a retained message which is overwritten 3x per day? Then on startup of any receiving application it'll only receive one sync command? |
Beta Was this translation helpful? Give feedback.
-
|
As far as I understand it, retained message will not go away until you publish something (or the same package) to the same topic without the retain flag. Clients connect 1-100 times a day, some even more, so having the sync command being received that often is not a suitable solution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Sorry if the title is a bit strange.
Let me explain.
I have a case we I push out a command 3 times a day, always the same command just telling my devices to
sync up. This is not hardcoded in the receiving application as I don't want to to be every time it start or only on a fixed time of the day.
I want both, if the device is online it should sync at these specific times, if it missed then it should sync up when starting.
I also wanted this to be adjustable without having to recompile 3 different programs.
The "issue" i'm having is that if the device has been offline for 24 hours, it will receive 3 identical messages as the broker has
publish it 3 times during that time.
Is there anyway I can detect there is a sync-command undelivered or overwrite any existing packages with the same payload to the same channel?
Beta Was this translation helpful? Give feedback.
All reactions