Skip to content

Commit

Permalink
Fix merge artefact
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Oct 16, 2024
1 parent 9eafa61 commit 64870ed
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,10 @@ protected void asyncFailure(Object request, @Nullable Acknowledgment acknowledgm
catch (Throwable ex) {
this.logger.error(t, () -> "Future, Mono, or suspend function was completed with an exception for " + source);
acknowledge(acknowledgment);
if (canAsyncRetry(request, ex) && this.callbackForAsyncFailure != null) {
if (canAsyncRetry(request, ex) && this.asyncRetryCallback != null) {
@SuppressWarnings("unchecked")
ConsumerRecord<K, V> record = (ConsumerRecord<K, V>) request;
this.callbackForAsyncFailure.accept(record, (RuntimeException) ex);
this.asyncRetryCallback.accept(record, (RuntimeException) ex);
}
}
}
Expand Down Expand Up @@ -929,15 +929,15 @@ private boolean rawByParameterIsType(Type parameterType, Type type) {
/**
* Set the retry callback for failures of both {@link CompletableFuture} and {@link Mono}.
* {@link MessagingMessageListenerAdapter#asyncFailure(Object, Acknowledgment, Consumer, Throwable, Message)}
* will invoke {@link MessagingMessageListenerAdapter#callbackForAsyncFailure} when
* will invoke {@link MessagingMessageListenerAdapter#asyncRetryCallback} when
* {@link CompletableFuture} or {@link Mono} fails to complete.
* @param asyncRetryCallback the callback for async retry.
* @since 3.3
*/
public void setCallbackForAsyncFailure(
@Nullable BiConsumer<ConsumerRecord<K, V>, RuntimeException> asyncRetryCallback) {

this.callbackForAsyncFailure = asyncRetryCallback;
this.asyncRetryCallback = asyncRetryCallback;
}

/**
Expand Down

0 comments on commit 64870ed

Please sign in to comment.