|
1 | 1 | /* |
2 | | - * Copyright 2015-2024 the original author or authors. |
| 2 | + * Copyright 2015-2025 the original author or authors. |
3 | 3 | * |
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
5 | 5 | * you may not use this file except in compliance with the License. |
|
37 | 37 | import org.apache.kafka.clients.producer.ProducerConfig; |
38 | 38 |
|
39 | 39 | import org.springframework.beans.factory.ObjectProvider; |
40 | | -import org.springframework.boot.autoconfigure.kafka.KafkaConnectionDetails; |
41 | | -import org.springframework.boot.autoconfigure.kafka.KafkaProperties; |
| 40 | +import org.springframework.boot.kafka.autoconfigure.KafkaConnectionDetails; |
| 41 | +import org.springframework.boot.kafka.autoconfigure.KafkaProperties; |
42 | 42 | import org.springframework.cloud.stream.binder.HeaderMode; |
43 | 43 | import org.springframework.cloud.stream.binder.ProducerProperties; |
44 | 44 | import org.springframework.cloud.stream.binder.kafka.properties.KafkaProducerProperties.CompressionType; |
@@ -402,7 +402,7 @@ public void setProducerProperties(Map<String, String> producerProperties) { |
402 | 402 | public Map<String, Object> mergedConsumerConfiguration() { |
403 | 403 | Map<String, Object> consumerConfiguration = new HashMap<>(this.kafkaProperties.buildConsumerProperties()); |
404 | 404 | if (this.kafkaConnectionDetails != null) { |
405 | | - consumerConfiguration.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, this.kafkaConnectionDetails.getConsumerBootstrapServers()); |
| 405 | + consumerConfiguration.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, this.kafkaConnectionDetails.getConsumer().getBootstrapServers()); |
406 | 406 | } |
407 | 407 | // Copy configured binder properties that apply to consumers |
408 | 408 | // allow schema registry properties to be propagated to consumer configuration |
@@ -431,7 +431,7 @@ public Map<String, Object> mergedConsumerConfiguration() { |
431 | 431 | public Map<String, Object> mergedProducerConfiguration() { |
432 | 432 | Map<String, Object> producerConfiguration = new HashMap<>(this.kafkaProperties.buildProducerProperties()); |
433 | 433 | if (this.kafkaConnectionDetails != null) { |
434 | | - producerConfiguration.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, this.kafkaConnectionDetails.getProducerBootstrapServers()); |
| 434 | + producerConfiguration.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, this.kafkaConnectionDetails.getProducer().getBootstrapServers()); |
435 | 435 | } |
436 | 436 | // Copy configured binder properties that apply to producers |
437 | 437 | for (Map.Entry<String, String> configurationEntry : this.configuration |
|
0 commit comments