Skip to content

Consolidate invokeHandler invocation #356

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

Merged

Conversation

sobychacko
Copy link
Collaborator

No description provided.

@sobychacko sobychacko requested a review from onobc February 17, 2023 20:27
@@ -146,22 +145,9 @@ protected org.springframework.messaging.Message<?> toMessagingMessageFromReader(
return getMessageConverter().toMessageFromReader(record, reader, getType());
}

protected final Object invokeHandler(Object data, org.springframework.messaging.Message<?> message,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically the HandlerAdapter already supported the varargs and we were forcing this artficial constraint by permutations of different handle methods in the adapter. This is more flexible and lets us just pass the args and the handler adapter will find the proper handler, correct?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that is correct. We were artificially making that extra hierarchy.

Copy link
Collaborator

@onobc onobc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sobychacko LGTM.

One question,
I take it that PulsarRecordMessagingMessageListenerAdapter was not being used by anything, correct?

@sobychacko sobychacko merged commit ba51c23 into spring-projects:main Feb 17, 2023
@sobychacko sobychacko deleted the invokehandler-refactoring branch February 17, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants