Skip to content

Commit

Permalink
Merge pull request #16481 from DuncanDoyle/bug/kafkaconnection-servic…
Browse files Browse the repository at this point in the history
…e-binding

Fix case of Kafka ServiceBinging properties
  • Loading branch information
geoand authored Apr 13, 2021
2 parents 2ceef3d + fadc477 commit b289957
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ public Optional<ServiceBindingConfigSource> convert(List<ServiceBinding> service
Map<String, String> properties = new HashMap<>();
ServiceBinding binding = matchingByType.get();

String bootstrapServers = binding.getProperties().get("bootstrapservers");
String bootstrapServers = binding.getProperties().get("bootstrapServers");
if (bootstrapServers == null) {
bootstrapServers = binding.getProperties().get("bootstrap-servers");
}
if (bootstrapServers != null) {
properties.put("kafka.bootstrap.servers", bootstrapServers);
}

String securityProtocol = binding.getProperties().get("securityprotocol");
String securityProtocol = binding.getProperties().get("securityProtocol");
if (securityProtocol != null) {
properties.put("kafka.security.protocol", securityProtocol);
}

String saslMechanism = binding.getProperties().get("saslmechanism");
String saslMechanism = binding.getProperties().get("saslMechanism");
if (saslMechanism != null) {
properties.put("kafka.sasl.mechanism", saslMechanism);
}
Expand Down

0 comments on commit b289957

Please sign in to comment.