KafkaInfraProperties

@ConfigurationProperties(prefix = "spring.kafka")
data class KafkaInfraProperties(val bootstrapServers: String = "localhost:29092", val schemaRegistryUrl: String = "http://localhost:8081", val security: KafkaInfraProperties.Security = Security(), val ssl: KafkaInfraProperties.Ssl = Ssl(), val consumer: KafkaInfraProperties.Consumer = Consumer())(source)

Type-safe configuration for the shared Kafka infrastructure.

Bound from spring.kafka.* in application.yml, mirroring the keys used by Spring Boot's own Kafka configuration so existing application-*.yml files remain compatible.

Replaces ad-hoc @Value("${spring.kafka.bootstrap-servers:...}") lookups and keeps the style consistent with MailProperties (mail-service) and SharedConfigProperties.

Constructors

Link copied to clipboard
constructor(bootstrapServers: String = "localhost:29092", schemaRegistryUrl: String = "http://localhost:8081", security: KafkaInfraProperties.Security = Security(), ssl: KafkaInfraProperties.Ssl = Ssl(), consumer: KafkaInfraProperties.Consumer = Consumer())

Types

Link copied to clipboard
data class Consumer(val groupId: String = "default-group", val autoOffsetReset: String = "earliest")
Link copied to clipboard
data class Security(val protocol: String = "PLAINTEXT")

Broker connection security. Key names mirror Spring Boot's own spring.kafka.security.* so env overrides bind identically (SPRING_KAFKA_SECURITY_PROTOCOL / KAFKA_SECURITY_PROTOCOL via yml).

Link copied to clipboard
data class Ssl(val trustStoreLocation: String = "", val trustStoreType: String = "PKCS12", val trustStorePassword: String = "")

TLS trust for the SSL listener. Scoped to the Kafka client on purpose: a global JVM truststore would break the services' public-TLS calls (Keycloak, Resend). Mirrors spring.kafka.ssl.* key names.

Properties

Link copied to clipboard

Comma-separated list of Kafka broker addresses (host:port).

Link copied to clipboard
Link copied to clipboard

Schema Registry endpoint used by Avro serializer/deserializer.

Link copied to clipboard
Link copied to clipboard