1

I have a Spring-Boot application (Netflix Eureka), it should connect to rabbitMQ to provide the logs for logstash. If RabbitMQ is present evrything works fine, but if the server is not available it sends more than 20 requests to rabbitMQ per ms.

Here are my dependencies:

dependencies {
    compile('org.springframework.boot:spring-boot-starter-actuator')

    compile('org.springframework.cloud:spring-cloud-starter-netflix-eureka-server')

    compile('org.springframework.cloud:spring-cloud-starter-config')

    compile('org.springframework.retry:spring-retry:1.2.2.RELEASE')

    compile('org.springframework.boot:spring-boot-starter-aop:2.0.3.RELEASE')

    compileOnly('org.projectlombok:lombok')

    compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth', version: '2.1.1.RELEASE'
    compile('net.logstash.logback:logstash-logback-encoder:5.2')
    compile group: 'org.springframework.boot', name: 'spring-boot-starter-amqp', version: '2.1.5.RELEASE'

    testCompile('org.springframework.boot:spring-boot-starter-test')
}

I already tried not to use spring retry, but it was not the solution.

here is my configuration for rabbit:

spring:
  profiles: prod
  rabbitmq:
    host: rabbitmq
    port: 5672
    username: user
    password: supersecretpassword

I want to reduce the amont of retries to 1 per second. Currently there are 20+ per millisecond

EDIT: I am playing around with this and discovered that it does the same when accessing configuration fron cloud config. It sends tons of requests before the configuration is loaded with the wrong destination. As a result from thode massive requests the RAM has a heavy load.

Avo
  • 21
  • 4

0 Answers0