[
https://issues.apache.org/jira/browse/CAMEL-16079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17282659#comment-17282659
]
Catalin Alexandru Zamfir edited comment on CAMEL-16079 at 2/10/21, 7:49 PM:
----------------------------------------------------------------------------
Here's a full stack:
{code:java}
java.lang.NullPointerException: nulljava.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] at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:169)
~[camel-core-processor-3.7.2.jar:3.7.2] at
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395)
~[camel-core-processor-3.7.2.jar:3.7.2] at
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
[camel-base-engine-3.7.2.jar:3.7.2] at
org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
[camel-base-engine-3.7.2.jar:3.7.2] at
org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
[camel-core-processor-3.7.2.jar:3.7.2] at
org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312)
[camel-base-engine-3.7.2.jar:3.7.2] at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:207)
[camel-timer-3.7.2.jar:3.7.2] at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76)
[camel-timer-3.7.2.jar:3.7.2] at java.util.TimerThread.mainLoop(Timer.java:555)
[na:1.8.0_275] at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_275]
{code}
Here's the shortest code to reproduce it:
{code:java}
from ("timer://runOnce?repeatCount=1&delay=2000")
.setBody (constant ("Not required, but added a body"))
.to
("aws2-sns://arn:aws:sns:eu-west-1:123456789:somewhere-over-the-rainbow?amazonSNSClient=#snsClient");
{code}
We are compiling against JDK8 and running on JDK8 as more information. For the
moment until 3.7.3 or some other version is released with the bug-fix we'll try
to re-configure the component/endpoint as an workaround and set the
topicName/topicArn in the SnsConfiguration in the hope that it passes over the
NPE. That or we revert to a pre 3.7 version, we'll see. Hopefully this will be
a valid workaround, without the need to revert:
{code:java}
private final Sns2Component sns2Component; // Auto-wired
sns2Component.getConfiguration ().setTopcName/setTopicArn
{code}
was (Author: antauri):
Here's a full stack:
{code:java}
java.lang.NullPointerException: nulljava.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] at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:169)
~[camel-core-processor-3.7.2.jar:3.7.2] at
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:395)
~[camel-core-processor-3.7.2.jar:3.7.2] at
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
[camel-base-engine-3.7.2.jar:3.7.2] at
org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
[camel-base-engine-3.7.2.jar:3.7.2] at
org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
[camel-core-processor-3.7.2.jar:3.7.2] at
org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:312)
[camel-base-engine-3.7.2.jar:3.7.2] at
org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:207)
[camel-timer-3.7.2.jar:3.7.2] at
org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:76)
[camel-timer-3.7.2.jar:3.7.2] at java.util.TimerThread.mainLoop(Timer.java:555)
[na:1.8.0_275] at java.util.TimerThread.run(Timer.java:505) [na:1.8.0_275]
{code}
Here's the shortest code to reproduce it:
{code:java}
from ("timer://runOnce?repeatCount=1&delay=2000")
.setBody (constant ("Not required, but added a body"))
.to
("aws2-sns://arn:aws:sns:eu-west-1:123456789:somewhere-over-the-rainbow?amazonSNSClient=#snsClient");
{code}
We are compiling against JDK8 and running on JDK8 as more information. For the
moment until 3.7.3 or some other version is released with the bug-fix we'll try
to re-configure the component/endpoint as an workaround and set the
topicName/topicArn in the SnsConfiguration in the hope that it passes over the
NPE. That or we revert to a pre 3.7 version, we'll see.
> 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)