From 6feb886a4b3c8c7236ba83ca491cf2b9bc2b6593 Mon Sep 17 00:00:00 2001 From: pbobylev Date: Mon, 29 Jul 2024 16:58:04 +0500 Subject: [PATCH] MODSOURCE-752: add config param to enable/disable domain events --- .../folio/services/domainevent/RecordDomainEventPublisher.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod-source-record-storage-server/src/main/java/org/folio/services/domainevent/RecordDomainEventPublisher.java b/mod-source-record-storage-server/src/main/java/org/folio/services/domainevent/RecordDomainEventPublisher.java index adc483814..3303f9bff 100644 --- a/mod-source-record-storage-server/src/main/java/org/folio/services/domainevent/RecordDomainEventPublisher.java +++ b/mod-source-record-storage-server/src/main/java/org/folio/services/domainevent/RecordDomainEventPublisher.java @@ -21,6 +21,7 @@ import org.folio.rest.jaxrs.model.SourceRecordDomainEvent; import org.folio.rest.jaxrs.model.SourceRecordDomainEvent.EventType; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component @@ -29,6 +30,8 @@ public class RecordDomainEventPublisher { public static final String RECORD_DOMAIN_TOPIC = "srs.source_records"; private static final String RECORD_TYPE = "folio.srs.recordType"; private static final Logger LOG = LogManager.getLogger(); + @Value("${ENABLE_DOMAIN_EVENTS:true}") + private boolean enableDomainEvents; @Autowired private KafkaConfig kafkaConfig;