Depending on your goals, you might want to prevent your system from processing duplicate messages from a given message trigger. This situation is especially relevant when sending messages to function subscriptions, which can result in double invocations. (For an example of a function subscription, see Scenario A: Automatically Resizing VMs.)
To prevent your system from processing duplicate messages, write code that de-duplicates received messages by using identifiers specific to the trigger:
For any message, consider using a custom de-dupe key entered in the body of the message.
For alarm-triggered messages, use a combination of dedupekey and timestampEpochMillis from the alarm message.