Closed adamZakar closed 2 months ago
@adamZakar are you sure that a queue test
did not exist at the moment the code was running? Can you attach logs from ElasticMQ?
We are encountering a similar issue. I am uncertain if this is an AWS SDK issue or Elasticmq issue. I am using the following setup for the SQS client and have started receiving a 400 error after upgrading the AWS SDK v2 version from 2.21 to 2.25.18.
SqsAsyncClient.builder()
.credentialsProvider(AnonymousCredentialsProvider.create())
.overrideConfiguration(
ClientOverrideConfiguration.builder()
.putHeader("Host", "localhost:9324")
.build()
)
.endpointOverride(URI("http://localhost:9324"))
.region(Region.of("local"))
.build()
@deepkimchi I can't reproduce the issue with the following steps:
docker run -p 9324:9324 --rm softwaremill/elasticmq-native
client.createQueue(CreateQueueRequest.builder().queueName("testQueue1").build()).get()
And it works. Any idea what's missing?
Only logs that's are related to ElasticMQ.
16:39:51.374 [elasticmq-akka.actor.default-dispatcher-4] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started 16:39:51.878 [elasticmq-akka.actor.default-dispatcher-4] INFO o.e.rest.sqs.TheSQSRestServerBuilder - Started SQS rest server, bind address :60435, visible server address http://localhost:60435
We use the in memory version of it. Can you try to initiate the client the way we did it?
We are using this version of elastic mq: https://mvnrepository.com/artifact/org.elasticmq/elasticmq-server_2.13/1.2.1 we are using the latest version of AWS SDK 2.0
Version 1.2.1
does not support AWS SDK 2.0. Please upgrade to latest.
It solved the issue thanks. closing the ticket.
Hi,
We are using aws sdk 2.0. with the following setup:
It used to work but recently it's been failing with
Caused by: software.amazon.awssdk.services.sqs.model.SqsException: Service returned HTTP status code 400 (Service: Sqs, Status Code: 400, Request ID: null)
. Any idea why it is failing?