我已经使用 Spring Cloud AWS API 实现注释驱动队列侦听器。
<aws-messaging:annotation-driven-queue-listener max-number-of-messages="10" task-executor="messagingTaskExecutor" wait-time-out="20"
visibility-timeout="100" amazon-sqs="sqsClient" region="us-west-1" />
在下面的日志文件中,我可以看到请求不断发送到 us-east-1 区域,尽管我提供了区域 us-west-1。请求发送间隔是每秒 3 个请求,这太多了
amz-sdk-invocation-id:4865f324-322f-53f2-9f4d-f989e106e96c
amz-sdk-retry:0/0/500
**host:sqs.us-east-1.amazonaws.com**
user-agent:aws-sdk-java/1.11.18 Mac_OS_X/10.11.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.111-b14/1.8.0_111 AmazonSQSBufferedAsyncClient/1.11.18
x-amz-date:20170210T030639Z
amz-sdk-invocation-id;amz-sdk-retry;host;user-agent;x-amz-date
937d63370e14d7439a711514a14d0d371c3f6fc73208e1a9d54bd99f194e42a7"
2017-02-10 08:36:39 DEBUG AWS4Signer:33 - AWS4 String to Sign: '"AWS4-HMAC-SHA256
20170210T030639Z
20170210/us-east-1/sqs/aws4_request
07187f106ed69b4b3ad36be48ba53811adc903a39388c5b0a1677ad2af93f38b"
2017-02-10 08:36:39 DEBUG RequestAddCookies:122 - CookieSpec selected: default
2017-02-10 08:36:39 DEBUG RequestAuthCache:76 - Auth cache not set in the context
2017-02-10 08:36:39 DEBUG PoolingHttpClientConnectionManager:249 - Connection request: [route: {s}->https://sqs.us-east-1.amazonaws.com:443][total kept alive: 1; route allocated: 1 of 50; total allocated: 1 of 50]
2017-02-10 08:36:39 DEBUG PoolingHttpClientConnectionManager:282 - Connection leased: [id: 23][route: {s}->https://sqs.us-east-1.amazonaws.com:443][total kept alive: 0; route allocated: 1 of 50; total allocated: 1 of 50]
2017-02-10 08:36:39 DEBUG MainClientExec:207 - Stale connection check
2017-02-10 08:36:39 DEBUG wire:86 - http-outgoing-23 << "[read] I/O error: Read timed out"
2017-02-10 08:36:39 DEBUG DefaultManagedHttpClientConnection:90 - http-outgoing-23: set socket timeout to 50000
2017-02-10 08:36:39 DEBUG MainClientExec:255 - Executing request POST /189178718836/CMR HTTP/1.1
2017-02-10 08:36:39 DEBUG MainClientExec:266 - Proxy auth state: UNCHALLENGED
2017-02-10 08:36:39 DEBUG headers:135 - http-outgoing-23 >> POST /189178718836/CMR HTTP/1.1
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Host: sqs.us-east-1.amazonaws.com
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Authorization: AWS4-HMAC-SHA256 Credential=something/20170210/us-east-1/sqs/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-retry;host;user-agent;x-amz-date, Signature=0d110d904500fd10a5262c5beea63df72eff28627801d0c00f74d499d4750092
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> X-Amz-Date: 20170210T030639Z
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> User-Agent: aws-sdk-java/1.11.18 Mac_OS_X/10.11.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.111-b14/1.8.0_111 AmazonSQSBufferedAsyncClient/1.11.18
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> amz-sdk-invocation-id: 4865f324-322f-53f2-9f4d-f989e106e96c
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> amz-sdk-retry: 0/0/500
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Content-Type: application/x-www-form-urlencoded; charset=utf-8
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Content-Length: 110
2017-02-10 08:36:39 DEBUG headers:138 - http-outgoing-23 >> Connection: Keep-Alive
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "POST /189178718836/CMR HTTP/1.1[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Host: sqs.us-east-1.amazonaws.com[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Authorization: AWS4-HMAC-SHA256 Credential=AKIAJRLXVVM5WJ5X7CFA/20170210/us-east-1/sqs/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-retry;host;user-agent;x-amz-date, Signature=0d110d904500fd10a5262c5beea63df72eff28627801d0c00f74d499d4750092[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "X-Amz-Date: 20170210T030639Z[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "User-Agent: aws-sdk-java/1.11.18 Mac_OS_X/10.11.6 Java_HotSpot(TM)_64-Bit_Server_VM/25.111-b14/1.8.0_111 AmazonSQSBufferedAsyncClient/1.11.18[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "amz-sdk-invocation-id: 4865f324-322f-53f2-9f4d-f989e106e96c[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "amz-sdk-retry: 0/0/500[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Content-Type: application/x-www-form-urlencoded; charset=utf-8[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Content-Length: 110[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "Connection: Keep-Alive[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:72 - http-outgoing-23 >> "[\r][\n]"
2017-02-10 08:36:39 DEBUG wire:86 - http-outgoing-23 >> "Action=ReceiveMessage&Version=2012-11-05&AttributeName.1=All&MessageAttributeName.1=All&MaxNumberOfMessages=10"
谁能告诉我为什么 spring cloud aws api 本身不断向 us-east-1 区域发送此请求?