Class KafkaProperties
- java.lang.Object
- org.springframework.boot.autoconfigure.kafka.KafkaProperties
@ConfigurationProperties(prefix="spring.kafka") public class KafkaProperties extends Object
Configuration properties for Spring for Apache Kafka.Users should refer to Kafka documentation for complete descriptions of these properties.
- Since:
- 1.5.0
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKafkaProperties.Consumerstatic classKafkaProperties.Listenerstatic classKafkaProperties.Producerstatic classKafkaProperties.Sslstatic classKafkaProperties.Template
Constructor Summary
Constructors Constructor Description KafkaProperties()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>buildConsumerProperties()Create an initial map of consumer properties from the state of this instance.Map<String,Object>buildProducerProperties()Create an initial map of producer properties from the state of this instance.List<String>getBootstrapServers()StringgetClientId()KafkaProperties.ConsumergetConsumer()KafkaProperties.ListenergetListener()KafkaProperties.ProducergetProducer()Map<String,String>getProperties()KafkaProperties.SslgetSsl()KafkaProperties.TemplategetTemplate()voidsetBootstrapServers(List<String> bootstrapServers)voidsetClientId(String clientId)voidsetProperties(Map<String,String> properties)
Constructor Detail
KafkaProperties
public KafkaProperties()
Method Detail
getBootstrapServers
public List<String> getBootstrapServers()
setBootstrapServers
public void setBootstrapServers(List<String> bootstrapServers)
getClientId
public String getClientId()
setClientId
public void setClientId(String clientId)
getProperties
public Map<String,String> getProperties()
setProperties
public void setProperties(Map<String,String> properties)
getConsumer
public KafkaProperties.Consumer getConsumer()
getProducer
public KafkaProperties.Producer getProducer()
getListener
public KafkaProperties.Listener getListener()
getSsl
public KafkaProperties.Ssl getSsl()
getTemplate
public KafkaProperties.Template getTemplate()
buildConsumerProperties
public Map<String,Object> buildConsumerProperties()
Create an initial map of consumer properties from the state of this instance.This allows you to add additional properties, if necessary, and override the default kafkaConsumerFactory bean.
- Returns:
- the consumer properties initialized with the customizations defined on this instance
buildProducerProperties
public Map<String,Object> buildProducerProperties()
Create an initial map of producer properties from the state of this instance.This allows you to add additional properties, if necessary, and override the default kafkaProducerFactory bean.
- Returns:
- the producer properties initialized with the customizations defined on this instance