[ 
https://issues.apache.org/jira/browse/CAMEL-15833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Otavio Rodolfo Piske reassigned CAMEL-15833:
--------------------------------------------

    Assignee: Otavio Rodolfo Piske

> camel-aws2-sqs: create queue logic is susceptible to TOC/TOU errors
> -------------------------------------------------------------------
>
>                 Key: CAMEL-15833
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15833
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws2
>    Affects Versions: 3.4.4, 3.6.0
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>
> The AWS v2 SQS component has a time-of-check / time-of-use bug when creating 
> creating queues. Currently, the code [checks if the queue exists and, if not, 
> creates 
> it|https://github.com/apache/camel/blob/828a99183f08b4ea609a765837c668b9aba21faa/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java#L192].
> However, if another application or thread creates the queue in between the 
> check and the creation, the component fails and the startup is aborted.
>  
> IMHO, a better approach would be to - in case of an exception - check if the 
> queue hasn't been created before aborting.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to