From 308cc6967a80ec1442a3b59ebc996765bb645a65 Mon Sep 17 00:00:00 2001 From: Kjetil Klepper Date: Mon, 6 Feb 2023 12:52:22 +0100 Subject: [PATCH] Forward all messages from CEGA to local 'files' queue --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 7bb597b..79408cd 100644 --- a/main.go +++ b/main.go @@ -124,7 +124,10 @@ func forwardDeliveryTo(fromCEGAToLEGA bool, channelFrom *amqp.Channel, channelTo err = publishError(delivery, err) failOnError(err, "Failed to publish error message") } - if messageType != nil { + // Forward all messages from CEGA to a local queue handled by the SDA intercept service + if fromCEGAToLEGA { + routingKey = os.Getenv("LEGA_MQ_QUEUE") + } else if messageType != nil { routingKey = messageType.(string) } err = channelTo.Publish(exchange, routingKey, false, false, *publishing)