Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.vality</groupId>
<artifactId>service-parent-pom</artifactId>
<version>3.0.0</version>
<version>3.1.0</version>
</parent>

<name>fraudbusters</name>
Expand Down Expand Up @@ -109,17 +109,6 @@
<dependency>
<groupId>dev.vality</groupId>
<artifactId>damsel</artifactId>
<version>1.648-ad715bd</version>
</dependency>
<dependency>
<groupId>dev.vality.woody</groupId>
<artifactId>woody-thrift</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>dev.vality.woody</groupId>
<artifactId>woody-api</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.errors.LogAndContinueExceptionHandler;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -19,10 +21,11 @@ public class KafkaStreamConfig {

public static final String SENDER = "sender";
private final ConsumerGroupIdService consumerGroupIdService;
private final ObjectProvider<SslBundles> sslBundles;

@Bean
public Properties rewriteStreamProperties(KafkaProperties kafkaProperties) {
final Map<String, Object> props = kafkaProperties.buildStreamsProperties();
final Map<String, Object> props = kafkaProperties.buildStreamsProperties(sslBundles.getIfAvailable());
props.put(StreamsConfig.APPLICATION_ID_CONFIG, consumerGroupIdService.generateGroupId(SENDER));
props.put(StreamsConfig.CLIENT_ID_CONFIG, consumerGroupIdService.generateGroupId(SENDER));
props.put(StreamsConfig.DEFAULT_KEY_SERDE_CLASS_CONFIG, Serdes.String().getClass().getName());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package dev.vality.fraudbusters.extension.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
import org.springframework.boot.ssl.SslBundles;
import org.springframework.boot.test.context.TestConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.kafka.config.TopicBuilder;
Expand All @@ -11,12 +13,15 @@
@TestConfiguration
public class KafkaTopicsConfig {

@Autowired
private ObjectProvider<SslBundles> sslBundles;

@Autowired
private KafkaProperties kafkaProperties;

@Bean
public KafkaAdmin adminClient() {
return new KafkaAdmin(kafkaProperties.buildAdminProperties());
return new KafkaAdmin(kafkaProperties.buildAdminProperties(sslBundles.getIfAvailable()));
}

@Bean
Expand Down
Loading