Skip to content

Commit

Permalink
Merge pull request #436 from bcgov/hotfix/spd-notificatio-worker-chan…
Browse files Browse the repository at this point in the history
…nel-closed-issue

Hotfix/spd notificatio worker channel closed issue
  • Loading branch information
brero12 authored Sep 11, 2023
2 parents 1dbc70a + 2311adb commit e286101
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class OutputNotificationConsumer {
private static final String DPS_FILE_ID_KEY = "dps.fileId";
private static final String DPS_BUSINESS_AREA_CD_KEY = "dps.businessAreaCd";
private static final String DEFAULT_VALUE = "0";
private static final String CONCURRENCY_QUEUE = "5";

private final FileService fileService;
private final SftpProperties sftpProperties;
Expand All @@ -57,7 +58,7 @@ public OutputNotificationConsumer(FileService fileService,
this.kofaxOutputMetadataContext = kofaxOutputMetadataContext;
}

@RabbitListener(queues = Keys.CRRP_QUEUE_NAME)
@RabbitListener(queues = Keys.CRRP_QUEUE_NAME, concurrency = CONCURRENCY_QUEUE)
public void receiveMessage(OutputNotificationMessage message) {

logger.info("received new {}", message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ spring.rabbitmq.host=${RABBITMQ_HOST:localhost}
spring.rabbitmq.port=${RABBITMQ_PORT:5672}
spring.rabbitmq.username=${RABBITMQ_USERNAME:guest}
spring.rabbitmq.password=${RABBITMQ_PASSWORD:guest}
spring.rabbitmq.cache.connection.size=${RABBITMQ_CACHECONNSIZE:50}
spring.rabbitmq.listener.simple.retry.enabled=${RABBITMQ_RETRY:true}
spring.rabbitmq.listener.simple.missing-queues-fatal=false
spring.rabbitmq.listener.simple.retry.initial-interval=5000 // the first time will wait 5 seconds to try again
spring.rabbitmq.listener.simple.retry.max-attempts=10 //will try a maximum of 10 times
spring.rabbitmq.listener.simple.retry.max-interval=300000 // the maximum interval between attempts is 5 minutes
spring.rabbitmq.listener.simple.retry.multiplier=1.0 // multiplies the range by 3


dps.messaging.exchange-name=notification
dps.messaging.routing-key=CRRP
Expand Down

0 comments on commit e286101

Please sign in to comment.