public interface AmazonSQSManager
Modifier and Type | Method and Description |
---|---|
String |
getRpcReplyQueueNameAndCreateIfNecessary(String moduleId,
String location)
Retrieve the queue name to use for RPC replies from a
specific RPC Module and location.
|
String |
getRpcRequestQueueNameAndCreateIfNecessary(String moduleId,
String location)
Retrieve the queue name to use for RPC request targetting
a specific RPC Module and location.
|
String |
getSinkQueueUrlAndCreateIfNecessary(String moduleId)
Retrieve the queue URL for the given Sink Module
and create the queue if it does not already exist.
|
com.amazonaws.services.sqs.AmazonSQS |
getSQSClient()
Retrieve the underlying SQS client.
|
com.amazon.sqs.javamessaging.SQSConnectionFactory |
getSQSConnectionFactory()
Retrieve a connection factory that wraps the
SQS client as a JMS provider.
|
String |
sendMessage(String queueUrl,
String body)
Send message.
|
com.amazonaws.services.sqs.AmazonSQS getSQSClient()
com.amazon.sqs.javamessaging.SQSConnectionFactory getSQSConnectionFactory()
String getSinkQueueUrlAndCreateIfNecessary(String moduleId) throws InterruptedException
This is a blocking operation. If AWS is unreachable, the method will keep retrying indefinitely until the queue is created and the queue URL is determined, or the thread is interrupted.
This function may cache the queue URL, avoiding unecesssary API calls.
moduleId
- the ID of the Sink ModuleInterruptedException
String getRpcRequestQueueNameAndCreateIfNecessary(String moduleId, String location) throws AmazonSQSQueueException
This function may cache the queue URL, avoiding unecesssary API calls.
moduleId
- the ID of the RPC Modulelocation
- the targetted location of the requestAmazonSQSQueueException
- if some error occured creating the queue or determining the URLString getRpcReplyQueueNameAndCreateIfNecessary(String moduleId, String location) throws AmazonSQSQueueException
This function may cache the queue URL, avoiding unecesssary API calls.
moduleId
- the ID of the RPC Modulelocation
- the source location of the replyAmazonSQSQueueException
- if some error occured creating the queue or determining the URLString sendMessage(String queueUrl, String body) throws InterruptedException
This is a blocking operation. If AWS is unreachable, the method will keep retrying indefinitely until the message is delivered or the thread is interrupted.
queueUrl
- the queue URLbody
- the message bodyInterruptedException
Copyright © 2020. All rights reserved.