From: Dasar Date: Fri, 12 Apr 2024 12:57:46 +0000 (+0530) Subject: Remove DMaaP dependency from AAI-Resources X-Git-Tag: 1.13.4~2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=e46a20c7d53690df1a0c9f5b3f052c12e3949fb2;p=aai%2Fresources.git Remove DMaaP dependency from AAI-Resources - Remove DMaaP related references from AAI-resources and added kafka related configuration - Updated AAI-Common version from 1.13.3 to 1.13.6 Issue-ID: AAI-3793 Change-Id: If1e141a3ae71b0c053f68ec13387426d3687f9c0 Signed-off-by: Dasar --- diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml index ced10c2a..79a1d751 100644 --- a/aai-resources/pom.xml +++ b/aai-resources/pom.xml @@ -528,18 +528,9 @@ gson - org.onap.dmaap.messagerouter.dmaapclient - dmaapClient - - - org.slf4j - slf4j-log4j12 - - - com.att.aft - dme2 - - + org.springframework.kafka + spring-kafka + 2.7.14 com.jayway.jsonpath diff --git a/aai-resources/src/main/resources/application.properties b/aai-resources/src/main/resources/application.properties index 3f0e6254..33556956 100644 --- a/aai-resources/src/main/resources/application.properties +++ b/aai-resources/src/main/resources/application.properties @@ -26,7 +26,7 @@ spring.autoconfigure.exclude=\ spring.jersey.application-path=${schema.uri.base.path} -spring.profiles.active=production,one-way-ssl,dmaap +spring.profiles.active=production,one-way-ssl,kafka #The max number of active threads in this pool server.jetty.threads.max=200 #The minimum number of threads always kept alive @@ -56,7 +56,15 @@ null.db.serialization.enabled=true # JMS bind address host port jms.bind.address=tcp://localhost:61647 -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-resources/src/main/resources/etc/appprops/aaiconfig.properties b/aai-resources/src/main/resources/etc/appprops/aaiconfig.properties index 4bcb2f34..025726c0 100644 --- a/aai-resources/src/main/resources/etc/appprops/aaiconfig.properties +++ b/aai-resources/src/main/resources/etc/appprops/aaiconfig.properties @@ -87,7 +87,8 @@ aai.forceDel.protected.nt.list=cloud-region aai.forceDel.protected.edge.count=10 aai.forceDel.protected.descendant.count=10 -aai.dmaap.workload.enableEventProcessing=true +# dmaap is deprecated now kafka is used +# aai.dmaap.workload.enableEventProcessing=true aai.realtime.clients=RO,SDNC,MSO,SO aai.jms.enable=false diff --git a/aai-resources/src/main/resources/etc/appprops/error.properties b/aai-resources/src/main/resources/etc/appprops/error.properties index 86d53370..f600a95b 100644 --- a/aai-resources/src/main/resources/etc/appprops/error.properties +++ b/aai-resources/src/main/resources/etc/appprops/error.properties @@ -154,7 +154,9 @@ AAI_7202=5:4:ERROR:7202:500:3002:Error getting connection to odl:200 #AAI_7206=5:4:ERROR:7206:500:3002:Invalid data returned from ODL:300 #--- DMaaP related errors -AAI_7304=4:5:ERROR:7304:500:3002:Error reaching DMaaP to send event:200 +# DMaaP is deprecated now +# Replaced with Kafka +AAI_7304=4:5:ERROR:7304:500:3002:Error reaching Kafka to send event:200 AAI_7350=5:4:ERROR:7305:500:3002:Notification event creation failed:500 #--- aairestctlr: 7401-7499 diff --git a/aai-resources/src/main/resources/logback.xml b/aai-resources/src/main/resources/logback.xml index 848c6751..2b8791a3 100644 --- a/aai-resources/src/main/resources/logback.xml +++ b/aai-resources/src/main/resources/logback.xml @@ -141,7 +141,7 @@ - WARN @@ -152,7 +152,7 @@ - DEBUG @@ -163,7 +163,7 @@ ${debugPattern} - INFO @@ -174,7 +174,7 @@ ${auditPattern} - INFO @@ -282,7 +282,7 @@ - + @@ -291,13 +291,13 @@ - - - + + + - + diff --git a/aai-resources/src/test/resources/application-test.properties b/aai-resources/src/test/resources/application-test.properties index 596bd237..daddc182 100644 --- a/aai-resources/src/test/resources/application-test.properties +++ b/aai-resources/src/test/resources/application-test.properties @@ -44,7 +44,8 @@ server.ssl.enabled=false # JMS bind address host port jms.bind.address=tcp://localhost:61647 -dmaap.ribbon.listOfServers=localhost:3904 +# Removed deprecated DMaaP reference +# dmaap.ribbon.listOfServers=localhost:3904 # Schema related attributes for the oxm and edges # Any additional schema related attributes should start with prefix schema schema.configuration.location=N/A diff --git a/aai-resources/src/test/resources/logback.xml b/aai-resources/src/test/resources/logback.xml index 8bb9e7c9..7d35439c 100644 --- a/aai-resources/src/test/resources/logback.xml +++ b/aai-resources/src/test/resources/logback.xml @@ -149,7 +149,7 @@ - WARN @@ -160,7 +160,7 @@ - DEBUG @@ -171,7 +171,7 @@ ${debugPattern} - INFO @@ -182,7 +182,7 @@ ${auditPattern} - INFO @@ -247,14 +247,14 @@ - - - - + + + + - + diff --git a/pom.xml b/pom.xml index 6d4b4126..2a9ae56d 100644 --- a/pom.xml +++ b/pom.xml @@ -48,7 +48,7 @@ /content/repositories/staging/ ${project.version} - 1.13.3 + 1.13.6 1.12.3