This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch CAMEL-16079-3.7.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit 3a9699c7638f582abc0bd38dae6ebf8b1e5a6c1b Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Mon Jan 25 18:26:34 2021 +0100 CAMEL-16079 - camel-aws-sns2 does not recognise FIFO queue configured though arn --- .../org/apache/camel/component/aws2/sns/Sns2Configuration.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java index e2564b8..1381113 100644 --- a/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java +++ b/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java @@ -20,6 +20,7 @@ import org.apache.camel.RuntimeCamelException; import org.apache.camel.spi.Metadata; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriParams; +import org.apache.camel.util.ObjectHelper; import software.amazon.awssdk.core.Protocol; import software.amazon.awssdk.services.sns.SnsClient; @@ -350,6 +351,12 @@ public class Sns2Configuration implements Cloneable { boolean isFifoTopic() { // AWS docs suggest this is valid derivation. // FIFO topic names must end with .fifo, and standard topic cannot - return topicName.endsWith(".fifo") || topicArn.endsWith(".fifo"); + if (topicName.endsWith(".fifo")) { + return true; + } + if (ObjectHelper.isNotEmpty(topicArn)) { + return topicArn.endsWith(".fifo"); + } + return false; } }