Skip to content

Commit db3c8f7

Browse files
committed
Fix handling of collections by non-reactive Consumers
1 parent eb8cc76 commit db3c8f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/SimpleFunctionRegistry.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,9 @@ private Map<String, Object> sanitizeHeaders(MessageHeaders headers) {
815815
*/
816816
@SuppressWarnings("unchecked")
817817
private Object fluxifyInputIfNecessary(Object input) {
818+
if (input instanceof Message && !((Message) input).getHeaders().containsKey("user-agent") && this.isConsumer() && !this.isInputTypePublisher()) {
819+
return input;
820+
}
818821
if (FunctionTypeUtils.isMultipleArgumentType(this.inputType)) {
819822
return input;
820823
}

0 commit comments

Comments
 (0)