public interface RecordMessageConverter extends MessageConverter
Message
converter strategy.Modifier and Type | Method and Description |
---|---|
org.apache.kafka.clients.producer.ProducerRecord<?,?> |
fromMessage(org.springframework.messaging.Message<?> message,
java.lang.String defaultTopic)
Convert a message to a producer record.
|
org.springframework.messaging.Message<?> |
toMessage(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record,
Acknowledgment acknowledgment,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer,
java.lang.reflect.Type payloadType)
Convert a
ConsumerRecord to a Message . |
commonHeaders, getGroupId
org.springframework.messaging.Message<?> toMessage(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, Acknowledgment acknowledgment, org.apache.kafka.clients.consumer.Consumer<?,?> consumer, java.lang.reflect.Type payloadType)
ConsumerRecord
to a Message
.record
- the record.acknowledgment
- the acknowledgment.consumer
- the consumerpayloadType
- the required payload type.org.apache.kafka.clients.producer.ProducerRecord<?,?> fromMessage(org.springframework.messaging.Message<?> message, java.lang.String defaultTopic)
message
- the message.defaultTopic
- the default topic to use if no header found.