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

Incorrect type of FunctionRegistration in 4.2.0 #1227

Open
alianman opened this issue Jan 14, 2025 · 2 comments
Open

Incorrect type of FunctionRegistration in 4.2.0 #1227

alianman opened this issue Jan 14, 2025 · 2 comments

Comments

@alianman
Copy link

alianman commented Jan 14, 2025

Describe the bug
After upgrade to 4.2.0 from older version (4.1.x) my Spring integration flows comined with SCF support was broken. I did all as described here, but with java.util.function.Consumer instead of java.util.function.Function. Now my function recognized as java.util.function.Consumer<Object> instead of java.util.function.Consumer<MyEvent>. Debugging made my way to org.springframework.cloud.function.context.catalog.FunctionTypeUtils#discoverFunctionType method. Some problem there.

Sample

IntegrationFlow.from(
            MyFunction.class,
            gatewayProxySpec -> gatewayProxySpec.beanName(functionName))
interface MyFunction extends Consumer<MyEvent> {}
@olegz
Copy link
Contributor

olegz commented Jan 14, 2025

Please try with the latest snapshot. There were major refactoring done on FunctionTypeUtils before 4.2 release but few issues were reported and fixed after.

@olegz
Copy link
Contributor

olegz commented Jan 16, 2025

@alianman any updates? Have you tried?

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

2 participants