1

I am trying to utilize AWS services like SQS and DynamoDB,

AWS provides async clients ( java ) for both AWS SQS and DynamoDB and many more. I am able to do basic operations via both clients.

What is the difference between the two clients , so I can decide to choose which client to move ahead with.

AmazonDynamoDB amazonDynamoDB = new AmazonDynamoDBAsyncClient(new DefaultAWSCredentialsProviderChain());
or
AmazonDynamoDB amazonDynamoDB = new AmazonDynamoDBClient(new DefaultAWSCredentialsProviderChain());
user1379280
  • 273
  • 1
  • 3
  • 18
  • 2
    What is the doubt here? If you need asyc then you use the async client or wrap the sync client with thread pools to get poor-man's-async-client. If you need sync then you use sync client. As simple as that. – sarveshseri Jul 21 '21 at 07:11
  • Whether you use Async or Sync client - you should be using Amazon DynamoDB V2 API, not V1. V2 examples are here in the Java V2 DEV Guide. https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/examples-dynamodb.html – smac2020 Jul 21 '21 at 08:49
  • @sarveshseri : i dont understand what sync async means here – user1379280 Jul 21 '21 at 09:16
  • 1
    @user1379280 if you don't know the difference you probably want sync – user253751 Jul 21 '21 at 12:22
  • There are lots of resources online that describe the difference between synchronous and asynchronous operations. Here's a popular post on the topic: https://stackoverflow.com/a/748189/13549664 – Seth Geoghegan Jul 21 '21 at 14:34

0 Answers0