Spring Boot Java Kafka configuration, overwrite port

Viewed 3299

I use Spring Boot + Kafka. This is my current, pretty simple configuration for Kafka:

@Configuration
@EnableKafka
public class KafkaConfig {

}

This configuration works pretty fine and is able to connect to Kafka instance on default Kafka port: 9092

Right now I need to change the port, let's say on 9093.

How to update this Kafka configuration in order to be able to connect on 9093?

1 Answers

I think something like this in your properties file will do the trick

spring.kafka.bootstrap-servers=localhost:9093

you can specify comma separated list of host:port

Related