Question

I am building a live logging mechanism where one of the server will push the logging messages, to amazon SQS queue, and another server will pull the corresponding messages and show on a live monitoring website. Now I want to know on a tomcat server how can I share a sqs connection over multiple requests? Any ideas for connection pooling guys?

Was it helpful?

Solution 2

AWS SQS provides a stateless RESTful API, which means that there is no such thing as "connection". You connect to it, send your request, get your response, and close HTTP session. There is nothing to share.

OTHER TIPS

Using AWS SDK for Java the class to access SQS is AmazonSQSClient. You can provide AmazonSQSClient with ClientConfiguration to setup the connection pool. By default ClientConfiguration has a max connection pool size of 50 (DEFAULT_MAX_CONNECTIONS).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top