Skip to content

Commit

Permalink
[fix][broker] Fix typos in Consumer class
Browse files Browse the repository at this point in the history
  • Loading branch information
hanmz committed Apr 18, 2024
1 parent 72474d7 commit 56b8c0e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public class Consumer {
@Setter
private volatile long consumerEpoch;

private long negtiveUnackedMsgsTimestamp;
private long negativeUnackedMsgsTimestamp;

@Getter
private final SchemaType schemaType;
Expand Down Expand Up @@ -1102,8 +1102,8 @@ private int addAndGetUnAckedMsgs(Consumer consumer, int ackedMessages) {
subscription.addUnAckedMessages(ackedMessages);
unackedMsgs = UNACKED_MESSAGES_UPDATER.addAndGet(consumer, ackedMessages);
}
if (unackedMsgs < 0 && System.currentTimeMillis() - negtiveUnackedMsgsTimestamp >= 10_000) {
negtiveUnackedMsgsTimestamp = System.currentTimeMillis();
if (unackedMsgs < 0 && System.currentTimeMillis() - negativeUnackedMsgsTimestamp >= 10_000) {
negativeUnackedMsgsTimestamp = System.currentTimeMillis();
log.warn("unackedMsgs is : {}, ackedMessages : {}, consumer : {}", unackedMsgs, ackedMessages, consumer);
}
return unackedMsgs;
Expand Down

0 comments on commit 56b8c0e

Please sign in to comment.