GH-1060 Fix KafkaNull regression issue
Fixing a KafkaNull related regression issue where consumers receive null values for payload erasing any headers completely. Resolves https://github.com/spring-cloud/spring-cloud-function/issues/1060
This commit is contained in:
@@ -1033,13 +1033,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry {
|
||||
}
|
||||
else {
|
||||
Object extractedValue = this.extractValueFromOriginalValueHolderIfNecessary(convertedInput);
|
||||
if (extractedValue instanceof Message &&
|
||||
((Message) extractedValue).getPayload().getClass().getName().equals("org.springframework.kafka.support.KafkaNull")) {
|
||||
((Consumer) this.target).accept(null);
|
||||
}
|
||||
else {
|
||||
((Consumer) this.target).accept(extractedValue);
|
||||
}
|
||||
((Consumer) this.target).accept(extractedValue);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user