Skip to content

Commit

Permalink
Keep consistent type for message id adding to and removing from the U…
Browse files Browse the repository at this point in the history
…nAckedMessageTracker
  • Loading branch information
aloyszhang committed Jul 16, 2023
1 parent 4a6a1ef commit 305ac2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ public void negativeAcknowledge(Message<?> message) {
negativeAcksTracker.add(message);

// Ensure the message is not redelivered for ack-timeout, since we did receive an "ack"
unAckedMessageTracker.remove(message.getMessageId());
unAckedMessageTracker.remove(MessageIdAdvUtils.discardBatch(message.getMessageId()));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public boolean add(MessageId messageId) {
if (messageId == null) {
return false;
}
messageId = MessageIdAdvUtils.discardBatch(messageId);

writeLock.lock();
try {
HashSet<MessageId> partition = timePartitions.peekLast();
Expand Down Expand Up @@ -224,7 +224,7 @@ public boolean remove(MessageId messageId) {
if (messageId == null) {
return false;
}
messageId = MessageIdAdvUtils.discardBatch(messageId);

writeLock.lock();
try {
boolean removed = false;
Expand Down

0 comments on commit 305ac2e

Please sign in to comment.