I have an IoT device that should be able to receive push notifications, but I don't want the notifications to be persisted in any way. The device is either currently online and receives the notification, Or it's not and then the notification should be lost and not delivered once the device goes online again. I understand that this is not how the configuration notifications work... Or do they? Is there any other way I can solve this problem? Basically it's sending a sort of commands to the device
Asked
Active
Viewed 147 times
1 Answers
0
As far as I know, you can't configure how often and for how long Google PubSub keeps pushing messages to clients when the clients don't acknowledge.
Do your clients know the current time? If so, you might try this algorithm in the client:
- Client receives command.
- Client acknowledges receipt.
- Client executes command only if it bears a recent timestamp.
That way, when a client comes back online it will drain the commands that were queued up during downtime, but won't take action on them.

Martin Omander
- 3,223
- 28
- 23