From a40a48ca18b65ec9b013925ee40187b853e07759 Mon Sep 17 00:00:00 2001 From: nabajyotiDash-hub Date: Wed, 6 Nov 2024 17:04:38 +0530 Subject: [PATCH] fix review comments --- .../main/java/com/bazaarvoice/emodb/queue/QueueModule.java | 7 ------- .../bazaarvoice/emodb/queue/core/AbstractQueueService.java | 2 +- .../com/bazaarvoice/emodb/sor/core/DefaultDataStore.java | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/queue/src/main/java/com/bazaarvoice/emodb/queue/QueueModule.java b/queue/src/main/java/com/bazaarvoice/emodb/queue/QueueModule.java index b42d33b02..c13d7a5c1 100644 --- a/queue/src/main/java/com/bazaarvoice/emodb/queue/QueueModule.java +++ b/queue/src/main/java/com/bazaarvoice/emodb/queue/QueueModule.java @@ -85,13 +85,6 @@ protected void configure() { bind(new TypeLiteral>() {}).annotatedWith(DedupEnabled.class).toInstance(Suppliers.ofInstance(true)); install(new EventStoreModule("bv.emodb.queue", _metricRegistry)); - // Bind Kafka services - bind (KafkaAdminService.class).asEagerSingleton(); - bind(KafkaProducerService.class).asEagerSingleton(); - - // Bind Step Function Service - bind(StepFunctionService.class).asEagerSingleton(); - // Bind the Queue instance that the rest of the application will consume bind(QueueService.class).to(DefaultQueueService.class).asEagerSingleton(); diff --git a/queue/src/main/java/com/bazaarvoice/emodb/queue/core/AbstractQueueService.java b/queue/src/main/java/com/bazaarvoice/emodb/queue/core/AbstractQueueService.java index 8f56b6c19..c16657aa9 100644 --- a/queue/src/main/java/com/bazaarvoice/emodb/queue/core/AbstractQueueService.java +++ b/queue/src/main/java/com/bazaarvoice/emodb/queue/core/AbstractQueueService.java @@ -458,7 +458,7 @@ private void startStepFunctionExecution(Map parameters, String q String timestamp = String.valueOf(System.currentTimeMillis()); queueName = stepFunctionService.sanitizeExecutionName(queueName); // Check if queueType is "dedupq" and prepend "D" to execution name if true - String executionName = (queueType.equalsIgnoreCase("dedupq") ? "D_" : "") + queueName + "_" + timestamp;; + String executionName = (queueType.equalsIgnoreCase("dedupq") ? "D_" : "") + queueName + "_" + timestamp; // Start the Step Function execution stepFunctionService.startExecution(stateMachineArn, inputPayload, executionName); diff --git a/sor/src/main/java/com/bazaarvoice/emodb/sor/core/DefaultDataStore.java b/sor/src/main/java/com/bazaarvoice/emodb/sor/core/DefaultDataStore.java index 8f61f61d0..e0f5e170e 100644 --- a/sor/src/main/java/com/bazaarvoice/emodb/sor/core/DefaultDataStore.java +++ b/sor/src/main/java/com/bazaarvoice/emodb/sor/core/DefaultDataStore.java @@ -757,7 +757,6 @@ public void beforeWrite(Collection updateBatch) { } } if (!updateRefs.isEmpty()) { - _eventWriterRegistry.getDatabusWriter().writeEvents(updateRefs); if(getDataThrottlerValue()) _kafkaProducerService.sendMessages(MASTER_FANOUT_TOPIC, updateRefs, "update"); else