Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is there a way to set max connections on the SQS client? #1056

Answered by ianbotsf
jadlr asked this question in Q&A
Discussion options

Java has an options that is explained here: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-throughput-horizontal-scaling-and-batching.html

final AmazonSQS sqsClient = AmazonSQSClientBuilder.standard()
 .withClientConfiguration(new ClientConfiguration()
 .withMaxConnections(producerCount + consumerCount))
 .build();

I could not find this option in the kotlin version.

You must be logged in to vote

Hi @jadlr. The AWS SDK for Kotlin does not support explicit configuration of maximum connections due to limitations in the underlying default HTTP engine (OkHttp). That said, it is possible to configure concurrency during client initialization:

val sqs = SqsClient {
 httpClient {
 maxConcurrency = 64u
 }
}

Does that address your needs?

Replies: 1 comment 1 reply

Comment options

Hi @jadlr. The AWS SDK for Kotlin does not support explicit configuration of maximum connections due to limitations in the underlying default HTTP engine (OkHttp). That said, it is possible to configure concurrency during client initialization:

val sqs = SqsClient {
 httpClient {
 maxConcurrency = 64u
 }
}

Does that address your needs?

You must be logged in to vote
1 reply
Comment options

Yes, absolutely! Thanks for your reply @ianbotsf

Answer selected by jadlr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /