Example usage for org.springframework.kafka.support KafkaNull INSTANCE

List of usage examples for org.springframework.kafka.support KafkaNull INSTANCE

Introduction

In this page you can find the example usage for org.springframework.kafka.support KafkaNull INSTANCE.

Prototype

KafkaNull INSTANCE

To view the source code for org.springframework.kafka.support KafkaNull INSTANCE.

Click Source Link

Document

Instance of KafkaNull.

Usage

From source file:org.springframework.kafka.support.converter.BatchMessagingMessageConverter.java

/**
 * Subclasses can convert the value; by default, it's returned as provided by Kafka
 * unless a {@link RecordMessageConverter} has been provided.
 * @param record the record.//  w  ww  . j  a  va2  s.c o m
 * @param type the required type.
 * @return the value.
 */
protected Object extractAndConvertValue(ConsumerRecord<?, ?> record, Type type) {
    return record.value() == null ? KafkaNull.INSTANCE : record.value();
}