From b93b12f80c36f372c07012ebf57a597ad8d489be Mon Sep 17 00:00:00 2001 From: Ahmed Elwasefi Date: Sun, 19 May 2024 16:27:51 +0300 Subject: [PATCH] Added concurency to all services. --- services/contracts/src/main/resources/application.properties | 2 ++ services/jobs/src/main/resources/application.properties | 3 +++ services/payments/src/main/resources/application.properties | 2 ++ services/users/src/main/resources/application.properties | 4 +--- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/services/contracts/src/main/resources/application.properties b/services/contracts/src/main/resources/application.properties index 0e7e5fa6..4890ffef 100644 --- a/services/contracts/src/main/resources/application.properties +++ b/services/contracts/src/main/resources/application.properties @@ -3,6 +3,8 @@ spring.rabbitmq.host=${CONTRACTS_MQ_URL} spring.rabbitmq.port=5672 spring.rabbitmq.username=guest spring.rabbitmq.password=guest +spring.rabbitmq.listener.simple.concurrency=1 +spring.rabbitmq.listener.simple.max-concurrency=10 spring.cassandra.local-datacenter=datacenter1 spring.cassandra.keyspace-name=contracts_data diff --git a/services/jobs/src/main/resources/application.properties b/services/jobs/src/main/resources/application.properties index 758a54d6..874dc831 100644 --- a/services/jobs/src/main/resources/application.properties +++ b/services/jobs/src/main/resources/application.properties @@ -2,6 +2,9 @@ spring.rabbitmq.host=${JOBS_MQ_URL} spring.rabbitmq.port=5672 spring.rabbitmq.username=guest spring.rabbitmq.password=guest +spring.rabbitmq.listener.simple.concurrency=1 +spring.rabbitmq.listener.simple.max-concurrency=10 + spring.cassandra.local-datacenter=datacenter1 spring.cassandra.keyspace-name=jobs_data spring.cassandra.contact-points=${JOBS_DB_URL} diff --git a/services/payments/src/main/resources/application.properties b/services/payments/src/main/resources/application.properties index c0355faf..99600358 100644 --- a/services/payments/src/main/resources/application.properties +++ b/services/payments/src/main/resources/application.properties @@ -12,6 +12,8 @@ spring.rabbitmq.host=${PAYMENTS_MQ_URL} spring.rabbitmq.port=5672 spring.rabbitmq.username=guest spring.rabbitmq.password=guest +spring.rabbitmq.listener.simple.concurrency=1 +spring.rabbitmq.listener.simple.max-concurrency=10 logging.level.root=INFO diff --git a/services/users/src/main/resources/application.properties b/services/users/src/main/resources/application.properties index 3279566a..ca8b3d67 100644 --- a/services/users/src/main/resources/application.properties +++ b/services/users/src/main/resources/application.properties @@ -6,10 +6,8 @@ spring.rabbitmq.host=${USERS_MQ_HOST} spring.rabbitmq.port=5672 spring.rabbitmq.username=guest spring.rabbitmq.password=guest -spring.rabbitmq.listener.simple.concurrency=5 +spring.rabbitmq.listener.simple.concurrency=1 spring.rabbitmq.listener.simple.max-concurrency=10 -spring.rabbitmq.listener.simple.prefetch=100 -spring.rabbitmq.listener.direct.prefetch=200 SECRET_KEY=${USERS_SECRET_KEY} spring.cache.type=redis