GH-2007 Ensure StreamBridge does not attempt to create Message from Message
Resolves #2007
This commit is contained in:
@@ -145,8 +145,9 @@ public final class StreamBridge implements SmartInitializingSingleton {
|
||||
|
||||
boolean skipConversion = producerProperties.isUseNativeEncoding();
|
||||
|
||||
Function<Object, Object> functionToInvoke = skipConversion ? v -> MessageBuilder.withPayload(v).build() :
|
||||
this.functionCatalog.lookup(STREAM_BRIDGE_FUNC_NAME, outputContentType.toString());
|
||||
Function<Object, Object> functionToInvoke = skipConversion
|
||||
? v -> v instanceof Message ? v : MessageBuilder.withPayload(v).build()
|
||||
: this.functionCatalog.lookup(STREAM_BRIDGE_FUNC_NAME, outputContentType.toString());
|
||||
|
||||
if (producerProperties != null && producerProperties.isPartitioned()) {
|
||||
functionToInvoke = new PartitionAwareFunctionWrapper((FunctionInvocationWrapper) functionToInvoke, this.applicationContext, producerProperties);
|
||||
|
||||
Reference in New Issue
Block a user