Skip to content

Fix POJO functions to return Message consistently - #1311

Closed
JunggiKim wants to merge 1 commit into
spring-cloud:mainfrom
JunggiKim:fix/gh-1307-pojo-message-wrapping-v2
Closed

JunggiKim wants to merge 1 commit into
spring-cloud:mainfrom
JunggiKim:fix/gh-1307-pojo-message-wrapping-v2

Conversation

@JunggiKim

@JunggiKim JunggiKim commented Nov 8, 2025 •

Copy link
Copy Markdown
Contributor

POJO functions now return Message when input is Message, maintaining consistency with regular Function implementations.

Fixes #1307

POJO functions now return Message when input is Message, maintaining
consistency with regular Function implementations. This ensures headers
are preserved in POJO functions just like regular functions.

Changes:
- Add isPojoFunction flag to identify POJO functions
- Mark POJO functions during discovery
- Re-wrap output in Message for POJO functions when input is Message
- Add test verifying Message return with header preservation
- Add test verifying plain String input returns plain String output

Fixes gh-1307

Signed-off-by: kjg <kimjg2477@gmail.com>
@olegz olegz added this to the 5.0 milestone Nov 10, 2025
@olegz olegz self-assigned this Nov 10, 2025
@olegz
olegz self-requested a review November 10, 2025 08:58
@olegz olegz closed this in f775edf Nov 10, 2025
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.

POJO function returns values instead of Message

2 participants