-
Notifications
You must be signed in to change notification settings - Fork 970
Description
Describe the bug
Following https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/lambda-optimize-starttime.html , I tried to use UrlConnectionHttpClient. After adding it to my dependencies and using it in one DDB client explicitly, another SQS client (without explicitly specifying any .httpClient in builder) started using this client and just hanged infinitely on ReceiveMessage call. After removing the dependency, the issue went away.
Expected behavior
SQS receiveMessage should work.
Current behavior
Hanging infinitely on SQS receiveMessage call.
Steps to Reproduce
Add dependency
implementation("software.amazon.awssdk:url-connection-client:2.17+")
Run
val sqsClient: SqsClient = SqsClient.create()
val request = ReceiveMessageRequest.builder()
.queueUrl(QUEUE_URL)
.visibilityTimeout(6000)
.waitTimeSeconds(3)
.maxNumberOfMessages(10)
.build()
val response = sqsClient.receiveMessage(request)
println("done")
Never gets to last line, hangs on receiveMessage.
Possible Solution
No response
Context
No response
AWS Java SDK version used
2.17.88
JDK version used
openjdk version "11.0.13" 2021-10-19 LTS OpenJDK Runtime Environment Corretto-11.0.13.8.1 (build 11.0.13+8-LTS) OpenJDK 64-Bit Server VM Corretto-11.0.13.8.1 (build 11.0.13+8-LTS, mixed mode)
Operating System and version
Ubuntu 20.04.2 LTS (WSL2)