messageDeduplicationId property
This parameter applies only to FIFO (first-in-first-out) queues.
The token used for deduplication of messages within a 5-minute minimum
deduplication interval. If a message with a particular
MessageDeduplicationId
is sent successfully, subsequent
messages with the same MessageDeduplicationId
are accepted
successfully but aren't delivered. For more information, see
Exactly-Once Processing in the Amazon Simple Queue Service Developer
Guide.
-
Every message must have a unique
MessageDeduplicationId
,-
You may provide a
MessageDeduplicationId
explicitly. -
If you aren't able to provide a
MessageDeduplicationId
and you enableContentBasedDeduplication
for your queue, Amazon SQS uses a SHA-256 hash to generate theMessageDeduplicationId
using the body of the message (but not the attributes of the message). -
If you don't provide a
MessageDeduplicationId
and the queue doesn't haveContentBasedDeduplication
set, the action fails with an error. -
If the queue has
ContentBasedDeduplication
set, yourMessageDeduplicationId
overrides the generated one.
-
You may provide a
-
When
ContentBasedDeduplication
is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered. -
If you send one message with
ContentBasedDeduplication
enabled and then another message with aMessageDeduplicationId
that is the same as the one generated for the firstMessageDeduplicationId
, the two messages are treated as duplicates and only one copy of the message is delivered.
Implementation
final String? messageDeduplicationId;