summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDasar <avinash.ganesh.dasar@accenture.com>2024-04-16 16:16:08 +0530
committerDasar <avinash.ganesh.dasar@accenture.com>2024-04-16 16:16:08 +0530
commitc6abadb957b5d37f9206ce164eb5b99651655f5a (patch)
tree7b514437d519da71d1d3b2e16f0fd2343183bda2
parentbbad8c69ea69956078e378228d20e7c1bcdf7cea (diff)
Remove DMaaP references from AAI-Traversal
- Replace DMaaP related configuration with kafka - Update AAI-Common version from 1.13.3 to 1.13.6 in pom.xml Issue-ID: AAI-3820 Change-Id: Ia989fcd65c61ef6abb6e2423a2d391140386589d Signed-off-by: Dasar <avinash.ganesh.dasar@accenture.com>
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/TraversalApp.java3
-rw-r--r--aai-traversal/src/main/resources/application.properties10
-rw-r--r--aai-traversal/src/main/resources/logback.xml34
-rw-r--r--aai-traversal/src/test/resources/application-test.properties2
-rw-r--r--aai-traversal/src/test/resources/logback.xml34
-rw-r--r--pom.xml2
6 files changed, 47 insertions, 38 deletions
diff --git a/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java b/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java
index 14bfca0..b382a16 100644
--- a/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java
+++ b/aai-traversal/src/main/java/org/onap/aai/TraversalApp.java
@@ -46,10 +46,11 @@ import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfigurat
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.core.env.Profiles;
+import org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration;
@SpringBootApplication(
exclude = {DataSourceAutoConfiguration.class,
- DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
+ DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class, JmsAutoConfiguration.class})
// Component Scan provides a way to look for spring beans
// It only searches beans in the following packages
// Any method annotated with @Bean annotation or any class
diff --git a/aai-traversal/src/main/resources/application.properties b/aai-traversal/src/main/resources/application.properties
index e624e96..02e488b 100644
--- a/aai-traversal/src/main/resources/application.properties
+++ b/aai-traversal/src/main/resources/application.properties
@@ -71,7 +71,15 @@ schema.source.name=onap
# JMS bind address host port
jms.bind.address=tcp://localhost:61646
-dmaap.ribbon.listOfServers=localhost:3904
+# dmaap is deprecated and now replaced with kafka
+# dmaap.ribbon.listOfServers=localhost:3904
+spring.kafka.producer.bootstrap-servers=${BOOTSTRAP_SERVERS}
+spring.kafka.producer.properties.security.protocol=SASL_PLAINTEXT
+spring.kafka.producer.properties.sasl.mechanism=SCRAM-SHA-512
+spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer
+spring.kafka.producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer
+spring.kafka.producer.properties.sasl.jaas.config = ${JAAS_CONFIG}
+spring.kafka.producer.retries=3
# Schema related attributes for the oxm and edges
# Any additional schema related attributes should start with prefix schema
diff --git a/aai-traversal/src/main/resources/logback.xml b/aai-traversal/src/main/resources/logback.xml
index 9c0cf90..fee8005 100644
--- a/aai-traversal/src/main/resources/logback.xml
+++ b/aai-traversal/src/main/resources/logback.xml
@@ -220,14 +220,14 @@
<appender-ref ref="translog" />
</appender>
- <appender name="dmaapAAIEventConsumer"
+ <appender name="kafkaAAIEventConsumer"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/error.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/error.log.%d{yyyy-MM-dd}
</fileNamePattern>
<maxHistory>${maxHistory}</maxHistory>
<totalSizeCap>${totalSizeCap}</totalSizeCap>
@@ -238,16 +238,16 @@
</appender>
- <appender name="dmaapAAIEventConsumerDebug"
+ <appender name="kafkaAAIEventConsumerDebug"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>DEBUG</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/debug.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/debug.log.%d{yyyy-MM-dd}
</fileNamePattern>
<maxHistory>${maxHistory}</maxHistory>
<totalSizeCap>${totalSizeCap}</totalSizeCap>
@@ -256,16 +256,16 @@
<pattern>${debugPattern}</pattern>
</encoder>
</appender>
- <appender name="dmaapAAIEventConsumerInfo"
+ <appender name="kafkaAAIEventConsumerInfo"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/kafka-transaction.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/kafka-transaction.log.%d{yyyy-MM-dd}
</fileNamePattern>
<maxHistory>${maxHistory}</maxHistory>
<totalSizeCap>${totalSizeCap}</totalSizeCap>
@@ -274,16 +274,16 @@
<pattern>${auditPattern}</pattern>
</encoder>
</appender>
- <appender name="dmaapAAIEventConsumerMetric"
+ <appender name="kafkaAAIEventConsumerMetric"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/metrics.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}
</fileNamePattern>
<maxHistory>${maxHistory}</maxHistory>
<totalSizeCap>${totalSizeCap}</totalSizeCap>
@@ -372,7 +372,7 @@
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.onap.aai.aailog.logs.AaiDmaapMetricLog" level="INFO" additivity="false">
- <appender-ref ref="dmaapAAIEventConsumerMetric"/>
+ <appender-ref ref="kafkaAAIEventConsumerMetric"/>
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.onap.aai.logging.ErrorLogHelper" level="WARN" additivity="false">
@@ -387,14 +387,14 @@
<appender-ref ref="asyncDEBUG" />
<appender-ref ref="STDOUT" />
</logger>
- <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false">
- <appender-ref ref="dmaapAAIEventConsumer" />
- <appender-ref ref="dmaapAAIEventConsumerDebug" />
+ <logger name="org.onap.aai.kafka" level="DEBUG" additivity="false">
+ <appender-ref ref="kafkaAAIEventConsumer" />
+ <appender-ref ref="kafkaAAIEventConsumerDebug" />
<appender-ref ref="STDOUT" />
</logger>
<logger name="com.att.nsa.mr" level="INFO" >
- <appender-ref ref="dmaapAAIEventConsumerInfo" />
+ <appender-ref ref="kafkaAAIEventConsumerInfo" />
<appender-ref ref="STDOUT" />
</logger>
diff --git a/aai-traversal/src/test/resources/application-test.properties b/aai-traversal/src/test/resources/application-test.properties
index 00720c8..79281a6 100644
--- a/aai-traversal/src/test/resources/application-test.properties
+++ b/aai-traversal/src/test/resources/application-test.properties
@@ -49,7 +49,7 @@ server.ssl.enabled=false
# JMS bind address host port
jms.bind.address=tcp://localhost:61646
-dmaap.ribbon.listOfServers=localhost:3904
+# dmaap.ribbon.listOfServers=localhost:3904
# Schema related attributes for the oxm and edges
# Any additional schema related attributes should start with prefix schema
diff --git a/aai-traversal/src/test/resources/logback.xml b/aai-traversal/src/test/resources/logback.xml
index fc275dd..ac8d4be 100644
--- a/aai-traversal/src/test/resources/logback.xml
+++ b/aai-traversal/src/test/resources/logback.xml
@@ -181,14 +181,14 @@
<appender-ref ref="translog" />
</appender>
- <appender name="dmaapAAIEventConsumer"
+ <appender name="kafkaAAIEventConsumer"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>WARN</level>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/error.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/error.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/error.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
<encoder>
@@ -197,48 +197,48 @@
</appender>
- <appender name="dmaapAAIEventConsumerDebug"
+ <appender name="kafkaAAIEventConsumerDebug"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>DEBUG</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/debug.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/debug.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/debug.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>${debugPattern}</pattern>
</encoder>
</appender>
- <appender name="dmaapAAIEventConsumerInfo"
+ <appender name="kafkaAAIEventConsumerInfo"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/kafka-transaction.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/dmaap-transaction.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/kafka-transaction.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>${auditPattern}</pattern>
</encoder>
</appender>
- <appender name="dmaapAAIEventConsumerMetric"
+ <appender name="kafkaAAIEventConsumerMetric"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>INFO</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
- <File>${logDirectory}/dmaapAAIEventConsumer/metrics.log</File>
+ <File>${logDirectory}/kafkaAAIEventConsumer/metrics.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
- <fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}
+ <fileNamePattern>${logDirectory}/kafkaAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
<encoder>
@@ -320,7 +320,7 @@
<appender-ref ref="asyncMETRIC"/>
</logger>
<logger name="org.onap.aai.aailog.logs.AaiDmaapMetricLog" level="INFO">
- <appender-ref ref="dmaapAAIEventConsumerMetric"/>
+ <appender-ref ref="kafkaAAIEventConsumerMetric"/>
</logger>
<logger name="org.onap.aai.logging.ErrorLogHelper" level="WARN">
<appender-ref ref="asyncERROR"/>
@@ -329,13 +329,13 @@
<appender-ref ref="asynctranslog" />
</logger>
- <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false">
- <appender-ref ref="dmaapAAIEventConsumer" />
- <appender-ref ref="dmaapAAIEventConsumerDebug" />
+ <logger name="org.onap.aai.kafka" level="DEBUG" additivity="false">
+ <appender-ref ref="kafkaAAIEventConsumer" />
+ <appender-ref ref="kafkaAAIEventConsumerDebug" />
</logger>
<logger name="com.att.nsa.mr" level="INFO" >
- <appender-ref ref="dmaapAAIEventConsumerInfo" />
+ <appender-ref ref="kafkaAAIEventConsumerInfo" />
</logger>
<logger name="org.onap.aai.dbgen" level="WARN"/>
diff --git a/pom.xml b/pom.xml
index dac29d8..0606750 100644
--- a/pom.xml
+++ b/pom.xml
@@ -41,7 +41,7 @@
Nexus Proxy Properties and Snapshot Locations
Ideally this can be overwritten at runtime per internal environment specific values at runtime
-->
- <aai.common.version>1.13.3</aai.common.version>
+ <aai.common.version>1.13.6</aai.common.version>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<site.path>/content/sites/site/org/onap/aai/traversal/${project.artifactId}/${project.version}</site.path>
<release.path>/content/repositories/releases/</release.path>