Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 173f50b

Browse files
committed
get or default change
1 parent 54122d9 commit 173f50b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

queue/src/main/java/com/bazaarvoice/emodb/queue/QueueModule.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ protected void configure() {
8484
bind(DedupEventStoreChannels.class).toInstance(DedupEventStoreChannels.isolated("__dedupq_write:", "__dedupq_read:"));
8585
bind(new TypeLiteral<Supplier<Boolean>>() {}).annotatedWith(DedupEnabled.class).toInstance(Suppliers.ofInstance(true));
8686
install(new EventStoreModule("bv.emodb.queue", _metricRegistry));
87+
bind(KafkaAdminService.class).asEagerSingleton();
88+
bind(KafkaProducerService.class).asEagerSingleton();
8789

90+
// Bind Step Function Service
91+
bind(StepFunctionService.class).asEagerSingleton();
8892

8993
// Bind the Queue instance that the rest of the application will consume
9094
bind(QueueService.class).to(DefaultQueueService.class).asEagerSingleton();

queue/src/main/java/com/bazaarvoice/emodb/queue/core/kafka/KafkaConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class KafkaConfig {
5858
lingerMsConfig = parameterValues.getOrDefault("/" + UNIVERSE + "/emodb/kafka/lingerMs", "1");
5959

6060
// Configures the Kafka broker addresses for producer connections.
61-
bootstrapServersConfig = parameterValues.get("/" + UNIVERSE + "/emodb/kafka/bootstrapServers");
61+
bootstrapServersConfig = parameterValues.getOrDefault("/" + UNIVERSE + "/emodb/kafka/bootstrapServers", "localhost:9092");
6262

6363
logger.info("Kafka configurations loaded successfully from SSM.");
6464
} catch (AmazonServiceException e) {

queue/src/test/java/com/bazaarvoice/emodb/queue/QueueModuleTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ protected void configure() {
5959
bind(HostDiscovery.class).annotatedWith(DedupQueueHostDiscovery.class).toInstance(mock(HostDiscovery.class));
6060
bind(JobHandlerRegistry.class).toInstance(mock(JobHandlerRegistry.class));
6161
bind(JobService.class).toInstance(mock(JobService.class));
62-
bind (KafkaAdminService.class).asEagerSingleton();
63-
bind(KafkaProducerService.class).asEagerSingleton();
64-
65-
// Bind Step Function Service
66-
bind(StepFunctionService.class).asEagerSingleton();
6762

6863
MetricRegistry metricRegistry = new MetricRegistry();
6964
bind(MetricRegistry.class).toInstance(metricRegistry);

0 commit comments

Comments
 (0)