Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
11 changes: 8 additions & 3 deletions jpo-ode-core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -37,19 +39,21 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>

<dependency>
<!-- <dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-graphite</artifactId>
</dependency>
</dependency> -->
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>1.19.4</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
Expand Down Expand Up @@ -89,6 +93,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.15.1</version>
</dependency>
<dependency>
<groupId>com.networknt</groupId>
Expand Down
45 changes: 25 additions & 20 deletions jpo-ode-svcs/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>usdot.jpo.ode</groupId>
Expand Down Expand Up @@ -32,10 +34,10 @@
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
<groupId>com.vaadin.external.google</groupId>
<artifactId>android-json</artifactId>
</exclusion>
</exclusions>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -46,9 +48,9 @@
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -99,7 +101,7 @@
<dependency>
<groupId>org.webjars</groupId>
<artifactId>webjars-locator</artifactId>
<version>0.40</version>
<version>0.40</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
Expand All @@ -114,6 +116,7 @@
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.7.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
Expand Down Expand Up @@ -146,9 +149,9 @@
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.networknt</groupId>
Expand Down Expand Up @@ -185,17 +188,19 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
<execution>
<id>build-info</id>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
<!-- profile to output only source code and not include any spring boot dependencies in published jar -->
<!-- profile to output only source code and not include any spring boot dependencies in published
jar -->
<profiles>
<profile>
<id>package-jar</id>
Expand Down Expand Up @@ -229,4 +234,4 @@
</build>
</profile>
</profiles>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
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;
import org.springframework.kafka.annotation.EnableKafka;
Expand All @@ -24,28 +25,31 @@ public class KafkaConsumerConfig {

private final KafkaProperties kafkaProperties;
private final OdeKafkaProperties odeKafkaProperties;
private final SslBundles sslBundles;

/**
* Constructs a new instance of KafkaConsumerConfig with the specified Kafka properties.
*
* @param kafkaProperties The general Kafka properties used for configuring consumer settings.
* @param kafkaProperties The general Kafka properties used for configuring consumer settings.
* @param odeKafkaProperties The specific Ode Kafka properties which may include custom
* configurations relevant to the Ode system, possibly including
* brokers and other kafka-specific settings.
* configurations relevant to the Ode system, possibly including brokers and other
* kafka-specific settings.
* @param sslBundles The SSL bundles for secure connections.
*/
public KafkaConsumerConfig(KafkaProperties kafkaProperties,
OdeKafkaProperties odeKafkaProperties) {
public KafkaConsumerConfig(KafkaProperties kafkaProperties, OdeKafkaProperties odeKafkaProperties,
SslBundles sslBundles) {
this.kafkaProperties = kafkaProperties;
this.odeKafkaProperties = odeKafkaProperties;
this.sslBundles = sslBundles;
}

/**
* Creates and configures a {@link ConsumerFactory} for Kafka consumers with String key and
* value deserialization. The factory is configured using Kafka consumer properties defined
* in the application configuration.
* Creates and configures a {@link ConsumerFactory} for Kafka consumers with String key and value
* deserialization. The factory is configured using Kafka consumer properties defined in the
* application configuration.
*
* @return a {@link ConsumerFactory} instance configured to produce Kafka consumers with
* String key and value serialization.
* @return a {@link ConsumerFactory} instance configured to produce Kafka consumers with String
* key and value serialization.
*/
@Bean
public ConsumerFactory<String, String> consumerFactory() {
Expand All @@ -58,7 +62,7 @@ public ConsumerFactory<String, String> consumerFactory() {
* from Kafka topics.
*
* @return a ConcurrentKafkaListenerContainerFactory setup with a defined consumer factory that
* determines how Kafka consumers are created and configured.
* determines how Kafka consumers are created and configured.
*/
@Bean
public ConcurrentKafkaListenerContainerFactory<String, String> kafkaListenerContainerFactory() {
Expand All @@ -69,7 +73,7 @@ public ConcurrentKafkaListenerContainerFactory<String, String> kafkaListenerCont
}

private Map<String, Object> getKafkaConsumerProperties() {
Map<String, Object> props = new HashMap<>(kafkaProperties.buildConsumerProperties());
Map<String, Object> props = new HashMap<>(kafkaProperties.buildConsumerProperties(sslBundles));
if ("CONFLUENT".equals(this.odeKafkaProperties.getKafkaType())) {
props.putAll(this.odeKafkaProperties.getConfluent().buildConfluentProperties());
}
Expand Down
Loading