From 3c9bfad1f86c8dbde593e88cb143dcbba4a26af2 Mon Sep 17 00:00:00 2001 From: jianming tu Date: Thu, 7 Mar 2024 07:14:07 -0800 Subject: [PATCH 1/8] add log --- .../plugins/rabbitmq/RabbitMqDocumentInput.java | 2 ++ .../plugins/rabbitmq/RabbitMqDocumentOutput.java | 3 +++ .../plugins/rabbitmq/RabbitMqDocumentReadyService.java | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java index a89f316e..c3659992 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java @@ -60,6 +60,8 @@ public void receiveMessage(DocumentReadyMessage documentReadyMessage) throws Doc if (logger.isDebugEnabled()) { logger.debug(content); } + + logger.info("Receiving a transaction with [{0}] on document [{1}] with [key {2}, digest {3} and content {4} ] from RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), content ); this.documentReadyHandler.handle(content, documentReadyMessage.getTransactionInfo()); diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java index be069a77..f3f09fa7 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java @@ -54,6 +54,9 @@ public void send(String content, TransactionInfo transactionInfo) throws Documen DocumentReadyMessage documentReadyMessage = new DocumentReadyMessage(transactionInfo, documentInfo, documentStorageProperties); logger.debug("Attempting to publish [{}] ready message to [{}] topic.", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC); + + logger.info("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with content [{4}] to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), this.storageService.getString(documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest()) ); + this.rabbitMqDocumentReadyService.publish(documentReadyMessage); logger.info("[{}] successfully published to [{}] with [{}] routing key", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC, accessProperties.getOutput().getDocumentType()); diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java index 49a6818a..98206147 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java @@ -4,6 +4,8 @@ import ca.bc.gov.open.jrccaccess.libs.DocumentReadyMessage; import ca.bc.gov.open.jrccaccess.libs.DocumentReadyService; import ca.bc.gov.open.jrccaccess.libs.services.exceptions.ServiceUnavailableException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.amqp.AmqpConnectException; import org.springframework.amqp.AmqpIOException; import org.springframework.amqp.rabbit.core.RabbitTemplate; @@ -22,7 +24,7 @@ @Service @ConditionalOnProperty(name = "bcgov.access.output.plugin", havingValue = "rabbitmq") public class RabbitMqDocumentReadyService implements DocumentReadyService { - + private Logger logger = LoggerFactory.getLogger(RabbitMqDocumentReadyService.class); @Qualifier("documentReadyTopicTemplate") @Autowired private RabbitTemplate documentReadyTopicTemplate; @@ -41,6 +43,8 @@ public void publish(DocumentReadyMessage message) throws ServiceUnavailableExcep documentReadyTopicTemplate.convertAndSend(message, m -> { m.getMessageProperties().getHeaders().put(RabbitMqParam.X_DEAD_LETTER_ROUTING_KEY, accessProperties.getOutput().getDocumentType()); + + logger.info("Publish a document to RabbitMQ"); return m; }); From b5fc8808161892ab21b0c5d44017f45515ea3b91 Mon Sep 17 00:00:00 2001 From: jianming tu Date: Thu, 7 Mar 2024 08:05:05 -0800 Subject: [PATCH 2/8] add log --- .../autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java index f3f09fa7..457ed9b9 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java @@ -55,7 +55,7 @@ public void send(String content, TransactionInfo transactionInfo) throws Documen logger.debug("Attempting to publish [{}] ready message to [{}] topic.", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC); - logger.info("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with content [{4}] to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), this.storageService.getString(documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest()) ); + logger.info("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest() ); this.rabbitMqDocumentReadyService.publish(documentReadyMessage); logger.info("[{}] successfully published to [{}] with [{}] routing key", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC, accessProperties.getOutput().getDocumentType()); From 74f9e2e1ddd2da5d0591f5959253e6b031564362 Mon Sep 17 00:00:00 2001 From: jianming tu Date: Thu, 7 Mar 2024 08:45:32 -0800 Subject: [PATCH 3/8] add log --- .../plugins/rabbitmq/RabbitMqDocumentReadyService.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java index 98206147..49a6818a 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentReadyService.java @@ -4,8 +4,6 @@ import ca.bc.gov.open.jrccaccess.libs.DocumentReadyMessage; import ca.bc.gov.open.jrccaccess.libs.DocumentReadyService; import ca.bc.gov.open.jrccaccess.libs.services.exceptions.ServiceUnavailableException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.amqp.AmqpConnectException; import org.springframework.amqp.AmqpIOException; import org.springframework.amqp.rabbit.core.RabbitTemplate; @@ -24,7 +22,7 @@ @Service @ConditionalOnProperty(name = "bcgov.access.output.plugin", havingValue = "rabbitmq") public class RabbitMqDocumentReadyService implements DocumentReadyService { - private Logger logger = LoggerFactory.getLogger(RabbitMqDocumentReadyService.class); + @Qualifier("documentReadyTopicTemplate") @Autowired private RabbitTemplate documentReadyTopicTemplate; @@ -43,8 +41,6 @@ public void publish(DocumentReadyMessage message) throws ServiceUnavailableExcep documentReadyTopicTemplate.convertAndSend(message, m -> { m.getMessageProperties().getHeaders().put(RabbitMqParam.X_DEAD_LETTER_ROUTING_KEY, accessProperties.getOutput().getDocumentType()); - - logger.info("Publish a document to RabbitMQ"); return m; }); From e14dbb1c15d4699fc6351e3b053f32453d0c692a Mon Sep 17 00:00:00 2001 From: jianming tu Date: Thu, 7 Mar 2024 08:58:31 -0800 Subject: [PATCH 4/8] add log --- .../autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java index 457ed9b9..e70d201e 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java @@ -55,8 +55,6 @@ public void send(String content, TransactionInfo transactionInfo) throws Documen logger.debug("Attempting to publish [{}] ready message to [{}] topic.", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC); - logger.info("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest() ); - this.rabbitMqDocumentReadyService.publish(documentReadyMessage); logger.info("[{}] successfully published to [{}] with [{}] routing key", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC, accessProperties.getOutput().getDocumentType()); From 3222fd712e4db9ff27fa20ebadcf88e40892b063 Mon Sep 17 00:00:00 2001 From: jianming tu Date: Thu, 7 Mar 2024 09:18:52 -0800 Subject: [PATCH 5/8] add log --- .../autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java index c3659992..3c7aed9c 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java @@ -61,8 +61,8 @@ public void receiveMessage(DocumentReadyMessage documentReadyMessage) throws Doc logger.debug(content); } - logger.info("Receiving a transaction with [{0}] on document [{1}] with [key {2}, digest {3} and content {4} ] from RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), content ); - + logger.info("Receiving a transaction content {0} ] from RabbitMQ", content ); + this.documentReadyHandler.handle(content, documentReadyMessage.getTransactionInfo()); logger.debug("attempting to delete the document from redis storage"); From 20b32e72291005d29b87a7f8dcb36cd32fb5f9ff Mon Sep 17 00:00:00 2001 From: jianming tu Date: Mon, 11 Mar 2024 11:57:37 -0700 Subject: [PATCH 6/8] add logs --- .../autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java | 4 +++- .../plugins/rabbitmq/RabbitMqDocumentOutput.java | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java index 3c7aed9c..22354d8b 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java @@ -14,6 +14,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Component; +import java.text.MessageFormat; + /** * The RabbitMqDocumentInput handles document from the rabbitMq message listener * @@ -61,7 +63,7 @@ public void receiveMessage(DocumentReadyMessage documentReadyMessage) throws Doc logger.debug(content); } - logger.info("Receiving a transaction content {0} ] from RabbitMQ", content ); + logger.info(MessageFormat.format("Receiving a transaction with [{0}] on document [{1}] with [key {2}, digest {3} and content {4} ] from RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), content )); this.documentReadyHandler.handle(content, documentReadyMessage.getTransactionInfo()); diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java index e70d201e..359adf77 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java @@ -9,6 +9,8 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Service; +import java.text.MessageFormat; + /** * The rabbitMqDocumentOutput provides service to send document ready message * to the desired Queue. @@ -55,6 +57,8 @@ public void send(String content, TransactionInfo transactionInfo) throws Documen logger.debug("Attempting to publish [{}] ready message to [{}] topic.", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC); + logger.info(MessageFormat.format("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest()) ); + this.rabbitMqDocumentReadyService.publish(documentReadyMessage); logger.info("[{}] successfully published to [{}] with [{}] routing key", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC, accessProperties.getOutput().getDocumentType()); From 8a31db9e3adb6216b9bfc8db967fb115497752f1 Mon Sep 17 00:00:00 2001 From: jianming tu Date: Mon, 11 Mar 2024 13:12:01 -0700 Subject: [PATCH 7/8] add logs --- .../autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java | 4 ++-- .../plugins/rabbitmq/RabbitMqDocumentOutput.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java index 22354d8b..20ef3fb6 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java @@ -63,8 +63,8 @@ public void receiveMessage(DocumentReadyMessage documentReadyMessage) throws Doc logger.debug(content); } - logger.info(MessageFormat.format("Receiving a transaction with [{0}] on document [{1}] with [key {2}, digest {3} and content {4} ] from RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), content )); - +// TODO logger.info(MessageFormat.format("Receiving a transaction with [{0}] on document [{1}] with [key {2}, digest {3} and content {4} ] from RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), content )); + logger.info(MessageFormat.format("Receiving content {0} ] from RabbitMQ", content )); this.documentReadyHandler.handle(content, documentReadyMessage.getTransactionInfo()); logger.debug("attempting to delete the document from redis storage"); diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java index 359adf77..61146519 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java @@ -57,7 +57,7 @@ public void send(String content, TransactionInfo transactionInfo) throws Documen logger.debug("Attempting to publish [{}] ready message to [{}] topic.", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC); - logger.info(MessageFormat.format("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest()) ); +// TODO logger.info(MessageFormat.format("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest()) ); this.rabbitMqDocumentReadyService.publish(documentReadyMessage); logger.info("[{}] successfully published to [{}] with [{}] routing key", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC, accessProperties.getOutput().getDocumentType()); From 684db3a2f78461ff296254a353bdaef93c530d82 Mon Sep 17 00:00:00 2001 From: jianming tu Date: Mon, 11 Mar 2024 13:49:25 -0700 Subject: [PATCH 8/8] add logs --- .../autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java | 3 +-- .../autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java index 20ef3fb6..51ecceac 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentInput.java @@ -63,8 +63,7 @@ public void receiveMessage(DocumentReadyMessage documentReadyMessage) throws Doc logger.debug(content); } -// TODO logger.info(MessageFormat.format("Receiving a transaction with [{0}] on document [{1}] with [key {2}, digest {3} and content {4} ] from RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest(), content )); - logger.info(MessageFormat.format("Receiving content {0} ] from RabbitMQ", content )); + this.documentReadyHandler.handle(content, documentReadyMessage.getTransactionInfo()); logger.debug("attempting to delete the document from redis storage"); diff --git a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java index 61146519..06f484f0 100644 --- a/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java +++ b/jrcc-access-spring-boot-autoconfigure/src/main/java/ca/bc/gov/open/jrccaccess/autoconfigure/plugins/rabbitmq/RabbitMqDocumentOutput.java @@ -57,8 +57,6 @@ public void send(String content, TransactionInfo transactionInfo) throws Documen logger.debug("Attempting to publish [{}] ready message to [{}] topic.", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC); -// TODO logger.info(MessageFormat.format("Publishing a transaction with [{0}] on document [{1}] with [key {2}, digest {3} ] with to RabbitMQ", documentReadyMessage.getTransactionInfo(), documentReadyMessage.getDocumentInfo(), documentReadyMessage.getDocumentStorageProperties().getKey(), documentReadyMessage.getDocumentStorageProperties().getDigest()) ); - this.rabbitMqDocumentReadyService.publish(documentReadyMessage); logger.info("[{}] successfully published to [{}] with [{}] routing key", documentInfo, RabbitMqParam.DOCUMENT_READY_TOPIC, accessProperties.getOutput().getDocumentType());