[
https://issues.apache.org/jira/browse/CAMEL-14002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Otavio Rodolfo Piske updated CAMEL-14002:
-----------------------------------------
Description:
When a AWS-SQS component is setup to use a different host via the amazonAWSHost
property, this host is not honored during the initial listing of the queues.
Instead the component list tries to list the queues using the default amazon
AWS host which. As a result this causes the component to fail the
initialization and may prevent using camel with local/non-public instances of
AWS SQS hosts.
Here's a log snippet taken from a code that configures the AWS-SQS URL as:
{code:java}
aws-sqs://ckc?accessKey=accesskey&amazonAWSHost=localhost%3A33715&autoCreateQueue=false
{code}
This is what is printed on the logs:
{code:java}
2019-09-20 14:27:34,058 [ool-11-thread-1] DEBUG org.apache.http.wire -
http-outgoing-2 >> "POST / HTTP/1.1[\r][\n]"2019-09-20 14:27:34,058
[ool-11-thread-1] DEBUG org.apache.http.wire - http-outgoing-2 >> "Host:
sqs.us-east-1.amazonaws.com[\r][\n]"{code}
was:
When a AWS-SQS component is setup to use a different host via the amazonAWSHost
property, this host is not honored during the initial listing of the queues.
Instead the component list tries to list the queues using the default amazon
AWS host which. As a result this causes the component to fail the
initialization and may prevent using camel with local/non-public instances of
AWS SQS hosts.
Here's a log snippet taken from a code that configures the AWS-SQS URL as:
```
aws-sqs://ckc?accessKey=accesskey&amazonAWSHost=localhost%{color:#9876aa}3A33715{color}&autoCreateQueue={color:#9876aa}false{color}
```
```
{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> POST /
HTTP/{color:#9876aa}1{color}.{color:#9876aa}1
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> Host:
{color:#9876aa}sqs.us-east-1.amazonaws.com
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> Authorization: AWS4-HMAC-SHA256
Credential=accesskey/{color:#9876aa}20190920{color}/us-east-{color:#9876aa}1{color}/sqs/aws4_request,
SignedHeaders=amz-sdk-invocation-id;amz-sdk-retry;host;user-agent;x-amz-date,
Signature={color:#9876aa}46b27250b825b38a2282570329f56ed91d747d60234760080388461476c720d1
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> X-Amz-Date: 20190920T122733Z
{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> User-Agent:
aws-sdk-java/{color:#9876aa}1{color}.{color:#9876aa}11{color}.{color:#9876aa}618{color}
Linux/{color:#9876aa}5{color}.{color:#9876aa}2{color}.{color:#9876aa}11{color}-{color:#9876aa}200{color}.{color:#9876aa}fc30.x86_64{color}
OpenJDK_64-Bit_Server_VM/{color:#9876aa}25{color}.{color:#9876aa}222{color}-b10
java/{color:#9876aa}1{color}.{color:#9876aa}8{color}.0_222
scala/{color:#9876aa}2{color}.{color:#9876aa}12{color}.{color:#9876aa}4{color}
vendor/Oracle_Corporation
{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> amz-sdk-invocation-id:
{color:#9876aa}71037dfa-50a7-1c35-32e7-7f49334bfdf3
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> amz-sdk-retry:
{color:#9876aa}0{color}/{color:#9876aa}0{color}/{color:#9876aa}500
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> Content-Type:
application/x-www-form-urlencoded; charset=utf-{color:#9876aa}8
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> Content-Length: {color:#9876aa}36
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.headers{color} -
http-outgoing-{color:#9876aa}2{color} >> Connection: Keep-Alive
{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.wire{color} -
http-outgoing-{color:#9876aa}2{color} >> {color:#6a8759}"POST /
HTTP/1.1[\r][\n]"
{color}{color:#808080}2019-09-20 14:27:34,058{color}
[ool-{color:#9876aa}11{color}-thread-{color:#9876aa}1{color}] DEBUG
{color:#9876aa}org.apache.http.wire{color} -
http-outgoing-{color:#9876aa}2{color} >> {color:#6a8759}"Host:
sqs.us-east-1.amazonaws.com[\r][\n]"{color}
```
> amazonAWSHost is not honored when listing the queues
> ----------------------------------------------------
>
> Key: CAMEL-14002
> URL: https://issues.apache.org/jira/browse/CAMEL-14002
> Project: Camel
> Issue Type: Bug
> Components: camel-aws-sqs
> Affects Versions: 3.0.0
> Reporter: Otavio Rodolfo Piske
> Priority: Major
>
> When a AWS-SQS component is setup to use a different host via the
> amazonAWSHost property, this host is not honored during the initial listing
> of the queues. Instead the component list tries to list the queues using the
> default amazon AWS host which. As a result this causes the component to fail
> the initialization and may prevent using camel with local/non-public
> instances of AWS SQS hosts.
> Here's a log snippet taken from a code that configures the AWS-SQS URL as:
>
> {code:java}
> aws-sqs://ckc?accessKey=accesskey&amazonAWSHost=localhost%3A33715&autoCreateQueue=false
>
> {code}
>
> This is what is printed on the logs:
> {code:java}
> 2019-09-20 14:27:34,058 [ool-11-thread-1] DEBUG org.apache.http.wire -
> http-outgoing-2 >> "POST / HTTP/1.1[\r][\n]"2019-09-20 14:27:34,058
> [ool-11-thread-1] DEBUG org.apache.http.wire - http-outgoing-2 >> "Host:
> sqs.us-east-1.amazonaws.com[\r][\n]"{code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)