Skip to content

Commit

Permalink
Modify method name.
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenchickenlove committed Oct 10, 2024
1 parent 4a4a1ee commit 08e7721
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ else if (listener instanceof MessageListener) {
FailedRecordTuple<K, V> failedRecord = new FailedRecordTuple<>(cRecord, ex);
this.failedRecords.addLast(failedRecord);
};
this.listener.setCallbackForAsyncFailureQueue(callbackForAsyncFailureQueue);
this.listener.setCallbackForAsyncFailure(callbackForAsyncFailureQueue);
}
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
@FunctionalInterface
public interface MessageListener<K, V> extends GenericMessageListener<ConsumerRecord<K, V>> {

default void setCallbackForAsyncFailureQueue(
default void setCallbackForAsyncFailure(
BiConsumer<ConsumerRecord<K, V>, RuntimeException> asyncRetryCallback) {
//
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public void onMessage(ConsumerRecord<K, V> data, Consumer<?, ?> consumer) {
}

@Override
public void setCallbackForAsyncFailureQueue(BiConsumer<ConsumerRecord<K, V>, RuntimeException> callbackForAsyncFailureQueue) {
this.delegate.setCallbackForAsyncFailureQueue(callbackForAsyncFailureQueue);
public void setCallbackForAsyncFailure(BiConsumer<ConsumerRecord<K, V>, RuntimeException> callbackForAsyncFailureQueue) {
this.delegate.setCallbackForAsyncFailure(callbackForAsyncFailureQueue);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,8 @@ private boolean rawByParameterIsType(Type parameterType, Type type) {
return parameterType instanceof ParameterizedType pType && pType.getRawType().equals(type);
}

public void putInAsyncFailureQueue(BiConsumer<ConsumerRecord<K, V>, RuntimeException> callbackForAsyncFailureQueue) {
this.callbackForAsyncFailureQueue = callbackForAsyncFailureQueue;
protected void setCallbackForAsyncFailure(BiConsumer<ConsumerRecord<K, V>, RuntimeException> asyncRetryCallback) {
this.callbackForAsyncFailureQueue = asyncRetryCallback;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public void onMessage(ConsumerRecord<K, V> record, @Nullable Acknowledgment ackn
}

@Override
public void setCallbackForAsyncFailureQueue(
public void setCallbackForAsyncFailure(
BiConsumer<ConsumerRecord<K, V>, RuntimeException> asyncRetryCallback) {
putInAsyncFailureQueue(asyncRetryCallback);
super.setCallbackForAsyncFailure(asyncRetryCallback);
}
}

0 comments on commit 08e7721

Please sign in to comment.