Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
fix(redis): fix race condition that can result in message duplication (
Browse files Browse the repository at this point in the history
  • Loading branch information
asher authored Sep 21, 2018
1 parent e9a749e commit 2d96768
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class RedisQueue(
if (fingerprint != null) {
log.info("Re-prioritizing message as an identical one is already on the queue: " +
"$fingerprint, message: $message")
redis.zadd(queueKey, score(delay), fingerprint)
redis.zadd(queueKey, score(delay), fingerprint, zAddParams().xx())
fire(MessageDuplicate(message))
} else {
redis.queueMessage(message, delay)
Expand Down

0 comments on commit 2d96768

Please sign in to comment.