public class SQSConnectionFactory extends Object implements javax.jms.ConnectionFactory, javax.jms.QueueConnectionFactory
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
Deprecated.
|
| Constructor and Description |
|---|
SQSConnectionFactory(ProviderConfiguration providerConfiguration) |
SQSConnectionFactory(ProviderConfiguration providerConfiguration,
com.amazonaws.services.sqs.AmazonSQS client) |
SQSConnectionFactory(ProviderConfiguration providerConfiguration,
com.amazonaws.services.sqs.AmazonSQSClientBuilder clientBuilder) |
| Modifier and Type | Method and Description |
|---|---|
static SQSConnectionFactory.Builder |
builder()
Deprecated.
|
SQSConnection |
createConnection() |
SQSConnection |
createConnection(com.amazonaws.auth.AWSCredentials awsCredentials) |
SQSConnection |
createConnection(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider) |
SQSConnection |
createConnection(String awsAccessKeyId,
String awsSecretKey) |
javax.jms.QueueConnection |
createQueueConnection() |
javax.jms.QueueConnection |
createQueueConnection(String userName,
String password) |
public SQSConnectionFactory(ProviderConfiguration providerConfiguration)
public SQSConnectionFactory(ProviderConfiguration providerConfiguration, com.amazonaws.services.sqs.AmazonSQS client)
public SQSConnectionFactory(ProviderConfiguration providerConfiguration, com.amazonaws.services.sqs.AmazonSQSClientBuilder clientBuilder)
public SQSConnection createConnection() throws javax.jms.JMSException
createConnection in interface javax.jms.ConnectionFactoryjavax.jms.JMSExceptionpublic SQSConnection createConnection(String awsAccessKeyId, String awsSecretKey) throws javax.jms.JMSException
createConnection in interface javax.jms.ConnectionFactoryjavax.jms.JMSExceptionpublic SQSConnection createConnection(com.amazonaws.auth.AWSCredentials awsCredentials) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic SQSConnection createConnection(com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.QueueConnection createQueueConnection()
throws javax.jms.JMSException
createQueueConnection in interface javax.jms.QueueConnectionFactoryjavax.jms.JMSExceptionpublic javax.jms.QueueConnection createQueueConnection(String userName, String password) throws javax.jms.JMSException
createQueueConnection in interface javax.jms.QueueConnectionFactoryjavax.jms.JMSException@Deprecated public static SQSConnectionFactory.Builder builder()
Copyright © 2022. All rights reserved.