alexanoid
alexanoid

Reputation: 25770

Spring Boot Java Kafka configuration, overwrite port

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?

Upvotes: 5

Views: 5354

Answers (1)

pvpkiran
pvpkiran

Reputation: 27018

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

Upvotes: 12

Related Questions