Support native serialization in MessageChannelBinder
Resolves #691 - If the broker supports native serialization, then the serialization of the outbound payload is not done by the binder's producer binding outbound message handler. - At the consumer binding's inbound message handler, the extraction of embedded headers is performed only for the byte[] payload (given the deserialization would have already occurred at the broker level) - Add correspoinding tests in Kafka binder implementation - Rely on the received message type to decide on using out of the box deserializer (only if byte[] message payload is received)
This commit is contained in:
committed by
Marius Bogoevici
parent
6c9976b77f
commit
e7e799b8d8
@@ -1004,7 +1004,13 @@ Effective only for messaging middleware that does not support message headers na
|
||||
Useful when producing data for non-Spring Cloud Stream applications.
|
||||
+
|
||||
Default: `embeddedHeaders`.
|
||||
|
||||
useNativeEncoding::
|
||||
When set to `true`, the outbound message is serialized directly by client library, which must be configured correspondingly (e.g. setting an appropriate Kafka producer value serializer).
|
||||
When this configuration is being used, the outbound message marshalling is not based on the `contentType` of the binding.
|
||||
When native encoding is used, it is the responsibility of the consumer to use appropriate decoder (ex: Kafka consumer value de-serializer) to deserialize the inbound message.
|
||||
Also, when native encoding/decoding is used the `headerMode` property is ignored and headers will not be embedded into the message.
|
||||
+
|
||||
Default: `false`.
|
||||
[[contenttypemanagement]]
|
||||
== Content Type and Transformation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user