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

Optimize a MessagingMessageListenerAdapter returning null from the DelegatingInvocableHandler.invoke() #3697

Open
artembilan opened this issue Dec 31, 2024 · 0 comments

Comments

@artembilan
Copy link
Member

Right now the DelegatingInvocableHandler.invoke() always returns an InvocationResult even if result == null.
In the end we may just have a log message like:

Async result is null, ignoring

which is not always true for the regular void @KafkaHandler method.

Changing the logic in the mention method to:

		if (result != null) {
			return new InvocationResult(result, this.handlerSendTo.get(handler),
					this.handlerReturnsMessage.get(handler));
		}
		else {
			return null;
		}

would make some optimization where we would not try to resolve any reply attempts and creation of many interim objects like CompletableFuture.

Since this would be a breaking change, the issue is scheduled for the next 4.0 major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant