From 383cbc925177d00ee419eeb68fce08b1ec228ecb Mon Sep 17 00:00:00 2001 From: John Simons Date: Mon, 8 Jul 2024 08:24:27 +1000 Subject: [PATCH] Filter sqs fifo queue at the transport level --- .../Shared/PlatformEndpointHelper.cs | 1 - src/ServiceControl.Transports.SQS/AmazonSQSQuery.cs | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Particular.LicensingComponent/Shared/PlatformEndpointHelper.cs b/src/Particular.LicensingComponent/Shared/PlatformEndpointHelper.cs index ff361b2ef8..69057b71c4 100644 --- a/src/Particular.LicensingComponent/Shared/PlatformEndpointHelper.cs +++ b/src/Particular.LicensingComponent/Shared/PlatformEndpointHelper.cs @@ -11,7 +11,6 @@ public static bool IsPlatformEndpoint(string endpointName, ThroughputSettings th || endpointName.Equals(throughputSettings.ServiceControlQueue, StringComparison.OrdinalIgnoreCase) || endpointName.EndsWith(".Timeouts", StringComparison.OrdinalIgnoreCase) || endpointName.EndsWith(".TimeoutsDispatcher", StringComparison.OrdinalIgnoreCase) - || endpointName.EndsWith("-delay.fifo", StringComparison.OrdinalIgnoreCase) || endpointName.StartsWith($"{throughputSettings.ServiceControlQueue}.", StringComparison.OrdinalIgnoreCase) || endpointName.Equals(ServiceControlSettings.ServiceControlThroughputDataQueue, StringComparison.OrdinalIgnoreCase) || AuditThroughputCollectorHostedService.AuditQueues.Any(a => endpointName.Equals(a, StringComparison.OrdinalIgnoreCase)); diff --git a/src/ServiceControl.Transports.SQS/AmazonSQSQuery.cs b/src/ServiceControl.Transports.SQS/AmazonSQSQuery.cs index cf2ffbe8d0..ca34eddb4c 100644 --- a/src/ServiceControl.Transports.SQS/AmazonSQSQuery.cs +++ b/src/ServiceControl.Transports.SQS/AmazonSQSQuery.cs @@ -243,7 +243,10 @@ public override async IAsyncEnumerable GetQueueNames( foreach (var queue in response.QueueUrls.Select(url => url.Split('/')[4])) { - yield return new DefaultBrokerQueue(queue); + if (!queue.EndsWith("-delay.fifo", StringComparison.OrdinalIgnoreCase)) + { + yield return new DefaultBrokerQueue(queue); + } } if (response.NextToken is not null)