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.
A
MessageConverter implementation that uses a Spring Data
ProjectionFactory to bind incoming messages to projection interfaces.- Since:
- 2.1.1
-
Field Summary
Fields inherited from class MessagingMessageConverter
logger -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Create a newProjectingMessageConverterusing aJacksonUtils.enhancedObjectMapper()by default.ProjectingMessageConverter(com.fasterxml.jackson.databind.ObjectMapper mapper) Deprecated, for removal: This API element is subject to removal in a future version.Create a newProjectingMessageConverterusing the givenObjectMapper.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 newProjectingMessageConverterusing the givenObjectMapper.Deprecated, for removal: This API element is subject to removal in a future version.Create a newProjectingMessageConverterusing the givenObjectMapper. -
Method Summary
Modifier and TypeMethodDescriptionprotected @Nullable ObjectconvertPayload(org.springframework.messaging.Message<?> message) Deprecated, for removal: This API element is subject to removal in a future version.Subclasses can convert the payload; by default, it's sent unchanged to Kafka.protected ObjectextractAndConvertValue(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, @Nullable Type type) Deprecated, for removal: This API element is subject to removal in a future version.Subclasses can convert the value; by default, it's returned as provided by Kafka unless there is aSmartMessageConverterthat can convert it.Methods inherited from class MessagingMessageConverter
fromMessage, getMessagingConverter, initialRecordHeaders, setGenerateMessageId, setGenerateTimestamp, setHeaderMapper, setMessagingConverter, setRawRecordHeader, toMessageMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MessageConverter
commonHeaders
-
Constructor Details
-
ProjectingMessageConverter
public ProjectingMessageConverter()Deprecated, for removal: This API element is subject to removal in a future version.Create a newProjectingMessageConverterusing aJacksonUtils.enhancedObjectMapper()by default.- 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 newProjectingMessageConverterusing the givenObjectMapper.- Parameters:
mapper- must not be null.
-
ProjectingMessageConverter
Deprecated, for removal: This API element is subject to removal in a future version.Create a newProjectingMessageConverterusing the givenObjectMapper.- 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 newProjectingMessageConverterusing the givenObjectMapper.- Parameters:
mapper- must not be null.delegate- the delegate converter for outbound and non-interfaces.- Since:
- 2.3
-
-
Method Details
-
convertPayload
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:MessagingMessageConverterSubclasses can convert the payload; by default, it's sent unchanged to Kafka.- Overrides:
convertPayloadin classMessagingMessageConverter- 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:MessagingMessageConverterSubclasses can convert the value; by default, it's returned as provided by Kafka unless there is aSmartMessageConverterthat can convert it.- Overrides:
extractAndConvertValuein classMessagingMessageConverter- Parameters:
record- the record.type- the required type.- Returns:
- the value.
-
JacksonProjectingMessageConverterfor Jackson 3.