Java org.springframework.kafka.core KafkaTemplate fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.kafka.core KafkaTemplate fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.kafka.core KafkaTemplate.

The text is from its open source code.

Constructor

KafkaTemplate(ProducerFactory producerFactory)
Create an instance using the supplied producer factory and autoFlush false.

Method

TexecuteInTransaction(OperationsCallback callback)
voidflush()

Note It only makes sense to invoke this method if the ProducerFactory serves up a singleton producer (such as the DefaultKafkaProducerFactory ).

booleanisTransactional()
ListenableFuture>send(String topic, @Nullable V data)
ListenableFuture>send(ProducerRecord record)
ListenableFuture>send(Message message)
ListenableFuture>sendDefault(K key, @Nullable V data)
ListenableFuture>sendDefault(Integer partition, K key, @Nullable V data)
voidsendOffsetsToTransaction(Map offsets)
voidsetDefaultTopic(String defaultTopic)
Set the default topic for send methods where a topic is not provided.
voidsetMessageConverter(RecordMessageConverter messageConverter)
Set the message converter to use.