You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andrea Cosentino (JIRA)" <ji...@apache.org> on 2018/09/18 12:11:00 UTC

[jira] [Assigned] (CAMEL-12820) SQS: Malformed queue URL due to bad region parsing

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

Andrea Cosentino reassigned CAMEL-12820:
----------------------------------------

    Assignee: Andrea Cosentino

> SQS: Malformed queue URL due to bad region parsing
> --------------------------------------------------
>
>                 Key: CAMEL-12820
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12820
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws
>    Affects Versions: 2.22.1
>         Environment: AWS, Centos 7, Java 8, Spring boot 2
>            Reporter: Eduardo De Almeida AlmuiƱa
>            Assignee: Andrea Cosentino
>            Priority: Major
>              Labels: sqs
>
> h3. Diagnosis
> When configuring the component with a queue ARN, for example:
> {{aws-sqs://arn:aws:sqs:eu-west-1:account-number:queue-name}}
> The region is being parsed as {{EU_WEST_1}}. See [https://github.com/apache/camel/blob/master/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java#L64]
> The region is then used in the construction of the queue URL in https://github.com/apache/camel/blob/master/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsEndpoint.java#L132
> This creates a URL pointing to the wrong host: {{https://sqs.EU_WEST_1.amazonaws.com/account-number/queue-name}} when the right one should be {{https://sqs.eu-west-1.amazonaws.com/account-number/queue-name}} 
> Subsequents polls of the sqs component failed due to to this host not being recognised:
> {code}java.net.UnknownHostException: sqs.EU_WEST_1.amazonaws.com{code}
> h3. Proposed solution
> Invoke the {{getName}} method instead of {{toString}} the https://github.com/apache/camel/blob/master/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java#L64



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)