Merge branch 'master' into develop

This commit is contained in:
Zaripov Emil 2024-09-24 14:18:35 +03:00
commit 9ad6f2136f
3 changed files with 41 additions and 23 deletions

13
pom.xml
View file

@ -100,15 +100,28 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jooq</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<dependency>
<groupId>io.github.leofuso</groupId>
<artifactId>actuator-kafka</artifactId>
<version>v3.0.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>

View file

@ -1,3 +1,5 @@
server.servlet.context-path=/av
# spring kafka default beans properties begin ->
# kafka out admin bean settings
spring.kafka.admin.security.protocol=SASL_PLAINTEXT
@ -10,10 +12,10 @@ spring.kafka.bootstrap.servers=${OUT_KAFKA_SERVERS}
#
# kafka in consumer (with possibility for default bean)
#host1:port1, host2:port2
spring.kafka.consumer.bootstrap.servers=${IN_KAFKA_SERVERS}
spring.kafka.consumer.bootstrap.servers=${AV_KAFKA_SERVERS}
spring.kafka.consumer.security.protocol=SASL_PLAINTEXT
#login password to set
spring.kafka.consumer.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${IN_KAFKA_USERNAME}" password="${IN_KAFKA_PASSWORD}";
spring.kafka.consumer.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${AV_KAFKA_USERNAME}" password="${AV_KAFKA_PASSWORD}";
spring.kafka.consumer.properties.sasl.mechanism=SCRAM-SHA-256
#
spring.kafka.consumer.enable.auto.commit=false
@ -23,25 +25,25 @@ spring.kafka.listener.ack.mode=MANUAL_IMMEDIATE
#
# kafka out producer (with possibility for default bean)
#host1:port1, host2:port2
spring.kafka.producer.bootstrap.servers=${OUT_KAFKA_SERVERS}
spring.kafka.producer.bootstrap.servers=${ERVU_KAFKA_SERVERS}
spring.kafka.producer.security.protocol=SASL_PLAINTEXT
#login password to set
spring.kafka.producer.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${OUT_KAFKA_USERNAME}" password="${OUT_KAFKA_PASSWORD}";
spring.kafka.producer.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${ERVU_KAFKA_USERNAME}" password="${ERVU_KAFKA_PASSWORD}";
spring.kafka.producer.properties.sasl.mechanism=SCRAM-SHA-256
#
# kafka out general
spring.kafka.properties.security.protocol=SASL_PLAINTEXT
#login password to set
spring.kafka.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${OUT_KAFKA_USERNAME}" password="${OUT_KAFKA_PASSWORD}";
spring.kafka.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${ERVU_KAFKA_USERNAME}" password="${ERVU_KAFKA_PASSWORD}";
spring.kafka.properties.sasl.mechanism=SCRAM-SHA-256
# spring kafka default beans properties <- end
#
# kafka out consumer (not for default bean creation by spring)
#host1:port1, host2:port2
spring.kafka.out.consumer.bootstrap.servers=${OUT_KAFKA_SERVERS}
spring.kafka.out.consumer.bootstrap.servers=${ERVU_KAFKA_SERVERS}
spring.kafka.out.consumer.security.protocol=SASL_PLAINTEXT
#login password to set
spring.kafka.out.consumer.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${OUT_KAFKA_USERNAME}" password="${OUT_KAFKA_PASSWORD}";
spring.kafka.out.consumer.properties.sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="${ERVU_KAFKA_USERNAME}" password="${ERVU_KAFKA_PASSWORD}";
spring.kafka.out.consumer.properties.sasl.mechanism=SCRAM-SHA-256
#
spring.kafka.out.consumer.enable.auto.commit=false
@ -50,10 +52,10 @@ spring.kafka.out.consumer.group.id=response-consumers
spring.kafka.out.listener.ack.mode=MANUAL_IMMEDIATE
#
#
kafka.in.topic.name=${IN_KAFKA_TOPIC_NAME}
kafka.out.error.topic.name=${OUT_KAFKA_ERROR_TOPIC_NAME}
kafka.out.success.topic.name=${OUT_KAFKA_SUCCESS_TOPIC_NAME}
kafka.out.response.topic.name=${OUT_KAFKA_RESPONSE_TOPIC_NAME}
kafka.in.topic.name=${AV_KAFKA_TOPIC_NAME}
kafka.out.error.topic.name=${ERVU_KAFKA_ERROR_TOPIC_NAME}
kafka.out.success.topic.name=${ERVU_KAFKA_SUCCESS_TOPIC_NAME}
kafka.out.response.topic.name=${ERVU_KAFKA_RESPONSE_TOPIC_NAME}
#
av.rest.address=${AV_REST_ADDRESS}
av.first.timeout.milliseconds=${AV_FIRST_TIMEOUT_MILLISECONDS}
@ -75,3 +77,8 @@ spring.datasource.url=jdbc:postgresql://${SPRING_DATASOURCE_URL}
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
# spring jooq dsl bean properties <- end
# endpoints management
management.endpoints.web.exposure.include = health, info, metrics
management.endpoint.health.show-details = always
management.endpoint.health.group.readiness.include = kafka

View file

@ -1,15 +1,13 @@
MINIO_ROOT_USER=changeIt123
MINIO_ROOT_PASSWORD=changeIt123
IN_KAFKA_SERVERS=10.10.31.11:32609
IN_KAFKA_USERNAME=user1
IN_KAFKA_PASSWORD=Blfi9d2OFG
IN_KAFKA_TOPIC_NAME=file-to-upload
OUT_KAFKA_SERVERS=10.10.31.11:32609
OUT_KAFKA_USERNAME=user1
OUT_KAFKA_PASSWORD=Blfi9d2OFG
OUT_KAFKA_ERROR_TOPIC_NAME=ervu.lkrp.download.request
OUT_KAFKA_SUCCESS_TOPIC_NAME=ervu.lkrp.download.request
OUT_KAFKA_RESPONSE_TOPIC_NAME=ervu.lkrp.download.response
AV_KAFKA_SERVERS=10.10.31.11:32609
AV_KAFKA_USERNAME=user1
AV_KAFKA_PASSWORD=Blfi9d2OFG
AV_KAFKA_TOPIC_NAME=file-to-upload
ERVU_KAFKA_SERVERS=10.10.31.11:32609
ERVU_KAFKA_USERNAME=user1
ERVU_KAFKA_PASSWORD=Blfi9d2OFG
ERVU_KAFKA_ERROR_TOPIC_NAME=ervu.lkrp.download.request
ERVU_KAFKA_SUCCESS_TOPIC_NAME=ervu.lkrp.download.request
ERVU_KAFKA_RESPONSE_TOPIC_NAME=ervu.lkrp.download.response
AV_REST_ADDRESS=http://10.10.31.118:8085/scans
AV_FIRST_TIMEOUT_MILLISECONDS=1000
AV_RETRY_MAX_ATTEMPTS_COUNT=10