From 906f791cc6f95a35de2df6984d0ab1b8d1cd29e7 Mon Sep 17 00:00:00 2001 From: Tom Winter Date: Tue, 13 Aug 2024 14:19:08 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Sebastian --- .../report/core/DefaultReportDocumentChangeEventConsumer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt index 7b9dc6d..6b2868e 100644 --- a/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt +++ b/application/aam-backend-service/src/main/kotlin/com/aamdigital/aambackendservice/reporting/report/core/DefaultReportDocumentChangeEventConsumer.kt @@ -27,6 +27,7 @@ class DefaultReportDocumentChangeEventConsumer( @RabbitListener( queues = [ReportQueueConfiguration.DOCUMENT_CHANGES_REPORT_QUEUE], ackMode = "MANUAL", + // avoid concurrent processing so that we do not trigger multiple calculations for same data unnecessarily concurrency = "1-1", batch = "1" ) @@ -99,7 +100,7 @@ class DefaultReportDocumentChangeEventConsumer( return Mono.error { throw AmqpRejectAndDontRequeueException( - "[NO_USECASE_CONFIGURED] Could not found matching use case for: ${type.qualifiedName}", + "[NO_USECASE_CONFIGURED] Could not find matching use case for: ${type.qualifiedName}", ) } }