public class SQSConnectionFactory
extends java.lang.Object
AmazonSQSClient as well as setting
numberOfMessagesToPrefetch.
The numberOfMessagesToPrefetch parameter is used to size of the
prefetched messages, which can be tuned based on the application workload. It
helps in returning messages from internal buffers(if there is any) instead of
waiting for the SQS receiveMessage call to return.
If more physical connections than the default maximum value (that is 50 as of
today) are needed on the connection pool,
ClientConfiguration needs to be configured.
None of the createConnection methods set-up the physical
connection to SQS, so validity of credentials are not checked with those
methods.
| Modifier and Type | Class and Description |
|---|---|
static class |
SQSConnectionFactory.Builder |
| Modifier and Type | Method and Description |
|---|---|
static SQSConnectionFactory.Builder |
builder() |
SQSConnection |
createConnection() |
SQSConnection |
createConnection(AWSCredentials awsCredentials) |
SQSConnection |
createConnection(AWSCredentialsProvider awsCredentialsProvider) |
SQSConnection |
createConnection(java.lang.String awsAccessKeyId,
java.lang.String awsSecretKey) |
QueueConnection |
createQueueConnection() |
QueueConnection |
createQueueConnection(java.lang.String userName,
java.lang.String password) |
public SQSConnection createConnection() throws JMSException
JMSExceptionpublic SQSConnection createConnection(java.lang.String awsAccessKeyId, java.lang.String awsSecretKey) throws JMSException
JMSExceptionpublic SQSConnection createConnection(AWSCredentials awsCredentials) throws JMSException
JMSExceptionpublic SQSConnection createConnection(AWSCredentialsProvider awsCredentialsProvider) throws JMSException
JMSExceptionpublic QueueConnection createQueueConnection()
throws JMSException
JMSExceptionpublic QueueConnection createQueueConnection(java.lang.String userName,
java.lang.String password)
throws JMSException
JMSExceptionpublic static SQSConnectionFactory.Builder builder()