[
https://issues.apache.org/jira/browse/CAMEL-16079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17282650#comment-17282650
]
Catalin Alexandru Zamfir edited comment on CAMEL-16079 at 2/10/21, 7:18 PM:
----------------------------------------------------------------------------
Not sure it's fixed in 3.7.2 as we've just tested this today.
{code:java}
java.lang.NullPointerException: null
at
org.apache.camel.component.aws2.sns.Sns2Configuration.isFifoTopic(Sns2Configuration.java:354)
~[camel-aws2-sns-3.7.2.jar:3.7.2]
at
org.apache.camel.component.aws2.sns.Sns2Producer.configureFifoAttributes(Sns2Producer.java:138)
~[camel-aws2-sns-3.7.2.jar:3.7.2]
at
org.apache.camel.component.aws2.sns.Sns2Producer.process(Sns2Producer.java:65)
~[camel-aws2-sns-3.7.2.jar:3.7.2]
at
org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66)
~[camel-support-3.7.2.jar:3.7.2]
{code}
Here's how we declare the SNS endpoint.
{code:java}
fromF (direct (this))
.routeId (currentRoute)
.process (this::notifyViaSns)
.toF ("log:%s?level=INFO", currentRoute)
.to ("aws2-sns://{{output.sns-topic}}?amazonSNSClient=#snsClient");{code}
Is there a test that can confirm this works in 3.7.2? Could be an idea to pass
it via testcontainers (with localstack). We're a bit blocked going to
production by this and may have to revert to 3.6.x. Somehow feels like a
regression.
This happens at run-time (the application starts). If indeed the topicName is
null, maybe the component initialization should fail? (given the topic is part
of the path). Though this may hinder dynamic endpoints ...
was (Author: antauri):
Not sure it's fixed in 3.7.2 as we've just tested this today.
{code:java}
java.lang.NullPointerException: null
at
org.apache.camel.component.aws2.sns.Sns2Configuration.isFifoTopic(Sns2Configuration.java:354)
~[camel-aws2-sns-3.7.2.jar:3.7.2]
at
org.apache.camel.component.aws2.sns.Sns2Producer.configureFifoAttributes(Sns2Producer.java:138)
~[camel-aws2-sns-3.7.2.jar:3.7.2]
at
org.apache.camel.component.aws2.sns.Sns2Producer.process(Sns2Producer.java:65)
~[camel-aws2-sns-3.7.2.jar:3.7.2]
at
org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66)
~[camel-support-3.7.2.jar:3.7.2]
{code}
Here's how we declare the SNS endpoint.
{code:java}
fromF (direct (this))
.routeId (currentRoute)
.process (this::notifyViaSns)
.toF ("log:%s?level=INFO", currentRoute)
.to ("aws2-sns://{{output.sns-topic}}?amazonSNSClient=#snsClient");{code}
Is there a test that can confirm this works in 3.7.2? Could be an idea to pass
it via testcontainers (with localstack). We're a bit blocked going to
production by this and may have to revert to 3.6.x. Somehow feels like a
regression.
This happens at run-time (the application starts). If indeed the topicName is
null, maybe the component initialization should fail? (given the topic is part
of the path). Though this may hinder dynamic endpoints ...
> aws-sn2 does not recognise FIFO queue configured though arn
> -----------------------------------------------------------
>
> Key: CAMEL-16079
> URL: https://issues.apache.org/jira/browse/CAMEL-16079
> Project: Camel
> Issue Type: Bug
> Components: camel-aws2
> Affects Versions: 3.7.0, 3.7.1
> Environment: Likely any, but tested on a docker image of
> amazoncorretto:11
> Reporter: Aurore Weber
> Assignee: Andrea Cosentino
> Priority: Minor
> Fix For: 3.7.2, 3.8.0
>
>
> When configuring an AWS SNS that is a fifo through the topic, the code that
> identify it as FIFO does not pick up the information, and so does not provide
> the provide the required attribute messageGroupId.
>
> Issues is in file
> [https://github.com/apache/camel/blob/master/components/camel-aws2-sns/src/main/java/org/apache/camel/component/aws2/sns/Sns2Configuration.java]
>
>
> {code:java}
> boolean isFifoTopic() {
> return topicName.endsWith(".fifo");
> }
> {code}
> Likely this would fix it as the topicName is null, but the topicArn is not
> null whether it has been configured by topic or by arn :
> {code:java}
> boolean isFifoTopic() {
> return topicArn.endsWith(".fifo") ;
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)