Class ProjectingMessageConverter

java.lang.Object
org.springframework.kafka.support.converter.MessagingMessageConverter
org.springframework.kafka.support.converter.ProjectingMessageConverter
All Implemented Interfaces:
MessageConverter, RecordMessageConverter

@Deprecated(forRemoval=true, since="4.0") public class ProjectingMessageConverter extends MessagingMessageConverter
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.0 in favor of JacksonProjectingMessageConverter for Jackson 3.
A MessageConverter implementation that uses a Spring Data ProjectionFactory to bind incoming messages to projection interfaces.
Since:
2.1.1
Author:
Oliver Gierke, Artem Bilan, Gary Russell
  • Constructor Details

    • ProjectingMessageConverter

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

      public ProjectingMessageConverter(com.fasterxml.jackson.databind.ObjectMapper mapper)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new ProjectingMessageConverter using the given ObjectMapper.
      Parameters:
      mapper - must not be null.
    • ProjectingMessageConverter

      public ProjectingMessageConverter(MessagingMessageConverter delegate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new ProjectingMessageConverter using the given ObjectMapper.
      Parameters:
      delegate - the delegate converter for outbound and non-interfaces.
      Since:
      2.3
    • ProjectingMessageConverter

      public ProjectingMessageConverter(com.fasterxml.jackson.databind.ObjectMapper mapper, MessagingMessageConverter delegate)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new ProjectingMessageConverter using the given ObjectMapper.
      Parameters:
      mapper - must not be null.
      delegate - the delegate converter for outbound and non-interfaces.
      Since:
      2.3
  • 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 MessagingMessageConverter
      Parameters:
      message - the message.
      Returns:
      the payload.
    • extractAndConvertValue

      protected Object extractAndConvertValue(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, @Nullable Type type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from class: MessagingMessageConverter
      Subclasses can convert the value; by default, it's returned as provided by Kafka unless there is a SmartMessageConverter that can convert it.
      Overrides:
      extractAndConvertValue in class MessagingMessageConverter
      Parameters:
      record - the record.
      type - the required type.
      Returns:
      the value.