SQS FIFO Queue Deduplication

0

I am a bit confused by the meaning of "any messages sent with the same message deduplication ID are accepted successfully but aren't delivered during the 5-minute deduplication interval."

I send message A with deduplication id of 1234. I send another message B with the same deduplication id of 1234.

Does SQS ignore the second message B. Or save it and makes it visible after the 5-minute deduplication interval?

질문됨 8달 전980회 조회
4개 답변
1

Hello.

I tried it in my environment.

for i in {0..2}; do
    aws sqs send-message \
        --queue-url ${QUEUE_URL} \
        --message-body '{"message": "fifo-queue-duplicate-test"}' \
        --message-group-id Group1 \
        --message-deduplication-id "1"
done

When you run the above command, three messages will be sent to the SQS queue.
As a result, I was able to send three messages, but only one could be displayed as a message.
If you send a message with the same ID(above command) after 5 minutes, you can now see two messages.
In other words, I believe that the same ID will not be deduplicated if 5 minutes have elapsed.

profile picture
전문가
답변함 8달 전
profile pictureAWS
전문가
검토됨 8달 전
0

Thanks - that's what I'm seeing. So deduplication is only with 5 minutes, the messages will still be deduplicated after the 5 minutes is up.

I'm guessing there isn't any configuration that can be changed that if the same deduplication id is used, to discard the duplicate messages?

답변함 8달 전
0

If you send a message with the same dedup ID, within 5 minutes of the previous message, the new message is accepted by the queue, but discarded. You will only be able to consume it once.

profile pictureAWS
전문가
Uri
답변함 8달 전
0

okay - that was my expected behaviour but not what I've noticed. I will investigate further and see whats happening.

답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠