Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-3695: Fix MessagingMessageListenerAdapter to not ack when sync #3696

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@
import org.springframework.util.TypeUtils;

/**
* An abstract {@link org.springframework.kafka.listener.MessageListener} adapter
* An abstract {@link MessageListener} adapter
* providing the necessary infrastructure to extract the payload of a
* {@link org.springframework.messaging.Message}.
* {@link Message}.
*
* @param <K> the key type.
* @param <V> the value type.
Expand Down Expand Up @@ -205,9 +205,9 @@ public void setMessageConverter(RecordMessageConverter messageConverter) {

/**
* Return the {@link MessagingMessageConverter} for this listener,
* being able to convert {@link org.springframework.messaging.Message}.
* being able to convert {@link Message}.
* @return the {@link MessagingMessageConverter} for this listener,
* being able to convert {@link org.springframework.messaging.Message}.
* being able to convert {@link Message}.
*/
protected final RecordMessageConverter getMessageConverter() {
return this.messageConverter;
Expand Down Expand Up @@ -550,7 +550,9 @@ else if (!(result instanceof CompletableFuture<?>)) {
try {
if (t == null) {
asyncSuccess(r, replyTopic, source, messageReturnType);
acknowledge(acknowledgment);
if (isAsyncReplies()) {
acknowledge(acknowledgment);
}
}
else {
Throwable cause = t instanceof CompletionException ? t.getCause() : t;
Expand Down
Loading