Class BytesJsonMessageConverter

All Implemented Interfaces:
MessageConverter, RecordMessageConverter

@Deprecated(forRemoval=true, since="4.0") public class BytesJsonMessageConverter extends JsonMessageConverter
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.0 in favor of BytesJacksonJsonMessageConverter for Jackson 3.
JSON Message converter - Bytes on output, String, Bytes, or byte[] on input. Used in conjunction with Kafka BytesSerializer/(BytesDeserializer, ByteArrayDeserializer, or StringDeserializer). More efficient than StringJsonMessageConverter because the String<->byte[] conversion is avoided.
Since:
2.1.7
Author:
Gary Russell, Vladimir Loginov
  • Constructor Details

    • BytesJsonMessageConverter

      public BytesJsonMessageConverter()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • BytesJsonMessageConverter

      public BytesJsonMessageConverter(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • convertPayload

      protected @Nullable Object convertPayload(Message<?> message)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: MessagingMessageConverter
      Subclasses can convert the payload; by default, it's sent unchanged to Kafka.
      Overrides:
      convertPayload in class JsonMessageConverter
      Parameters:
      message - the message.
      Returns:
      the payload.