public class ByteArrayJsonMessageConverter extends JsonMessageConverter
byte[]
on output, String, Bytes, or byte[] on input.
Used in conjunction with Kafka ByteArraySerializer/ByteArrayDeserializer
. More
efficient than StringJsonMessageConverter
because the String<->byte[]
conversion is avoided.logger
Constructor and Description |
---|
ByteArrayJsonMessageConverter() |
ByteArrayJsonMessageConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
convertPayload(org.springframework.messaging.Message<?> message)
Subclasses can convert the payload; by default, it's sent unchanged to Kafka.
|
extractAndConvertValue, getObjectMapper, getTypeMapper, initialRecordHeaders, setTypeMapper
fromMessage, setGenerateMessageId, setGenerateTimestamp, setHeaderMapper, toMessage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
commonHeaders, getGroupId
public ByteArrayJsonMessageConverter()
public ByteArrayJsonMessageConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
protected java.lang.Object convertPayload(org.springframework.messaging.Message<?> message)
MessagingMessageConverter
convertPayload
in class JsonMessageConverter
message
- the message.