class SqsConsumer extends StrictLogging
- Source
- SqsConsumer.scala
- Alphabetic
- By Inheritance
- SqsConsumer
- StrictLogging
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val logger: Logger
- Attributes
- protected
- Definition Classes
- StrictLogging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def receiveAutoDelete(queueUrl: QueueUrl, maxMessages: Int = 10, waitTimeSeconds: FiniteDuration = Duration.Zero, onErrorMaxRetries: Int = 3): Observable[ConsumedMessage]
Starts the process that keeps consuming messages and deleting them right after.
Starts the process that keeps consuming messages and deleting them right after.
A ConsumedMessage provides the control over when the message is considered as processed, thus can be deleted from the source queue and allow the next message to be consumed.
- queueUrl
source queue url
- maxMessages
max number of message to be consumed, which at most can be 10, otherwise it will fail. The meaning of
maxMessages
can differ when this parameter is applied against standard or fifo queues.- Standard: it will solely represent the number of messages requested and consumed in the same request.
- Fifo: the max messages would actually represented as
inFlight
messages (consumed but not yet deleted), meaning that we would not be able to consume further message from the same queue until there is a deletion or thevisibilityTimeout
gets expired. See the official aws docs for further details.
- waitTimeSeconds
The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than the wait timeout. By default,
waitTimeSeconds
is set to Duration.Zero, akashort pooling
, which means that it will only consume messages available at that time. On the other hand, the user can switch tolong pooling
by increasing thewaitTimeSeconds
to more than zero, which in that case it will wait for new messages to be available. See more in docs: https://docs.amazonaws.cn/en_us/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling. Notice that inshort polling
(default), if there is no available message because theinFlight
has reached the maximum limits of the queue it will return software.amazon.awssdk.services.sqs.model.OverLimitException, on the other hand, when using long pooling we would just not receive messages. Additionally, ensure that the HTTP response timeout of the NettyNioAsyncHttpClient is longer than the WaitTimeSeconds parameter to avoid timeout errors.
- See also
receiveManualDelete for at least once semantics.
- def receiveManualDelete(queueUrl: QueueUrl, maxMessages: Int = 10, visibilityTimeout: FiniteDuration = 30.seconds, waitTimeSeconds: FiniteDuration = Duration.Zero, onErrorMaxRetries: Int = 5): Observable[DeletableMessage]
Starts the process of consuming deletable messages from the specified
queueUrl
.Starts the process of consuming deletable messages from the specified
queueUrl
.A DeletableMessage provides the control over when the message is considered as processed, thus, can be deleted from the source queue and allow the next message to be consumed.
- queueUrl
source queue url
- maxMessages
max number of message to be consumed, which at most can be 10, otherwise it will fail. The meaning of
maxMessages
can differ when this parameter is applied against standard or fifo queues.- Standard: it will solely represent the number of messages requested and consumed in the same request.
- Fifo: the max messages would actually represented as
inFlight
messages (consumed but not yet deleted), meaning that we would not be able to consume further message from the same queue until there is a deletion or thevisibilityTimeout
gets expired. See the official aws docs for further details.
- visibilityTimeout
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved (in case they have not been deleted before).
- waitTimeSeconds
The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than the wait timeout. By default,
waitTimeSeconds
is set to Duration.Zero, akashort pooling
, which means that it will only consume messages available at that time. On the other hand, the user can switch tolong pooling
by increasing thewaitTimeSeconds
to more than zero, which in that case it will wait for new messages to be available. See more in docs: https://docs.amazonaws.cn/en_us/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling. Notice that inshort polling
(default), if there is no available message because theinFlight
has reached the maximum limits of the queue it will return software.amazon.awssdk.services.sqs.model.OverLimitException, on the other hand, when using long pooling we would just not receive messages. Additionally, ensure that the HTTP response timeout of the NettyNioAsyncHttpClient is longer than the WaitTimeSeconds parameter to avoid timeout errors.
- See also
receiveAutoDelete for at most once semantics.
- def receiveSingleAutoDelete(queueUrl: QueueUrl, maxMessages: Int = 10, waitTimeSeconds: FiniteDuration = Duration.Zero, onErrorMaxRetries: Int = 1): Task[List[ConsumedMessage]]
Single receive message task that responds with a list of **already** deleted messages, aka ConsumedMessage, from the specified
queueUrl
.Single receive message task that responds with a list of **already** deleted messages, aka ConsumedMessage, from the specified
queueUrl
.Meaning that the semantics that this method provides are **at most once**, since the message is automatically deleted right after being consumed, in case there is a failure during the processing of the message it would be lost as it could not be read again from the queue.
- queueUrl
source queue url
- maxMessages
max number of message to be consumed, which at most can be 10, otherwise it will fail. The meaning of
maxMessages
can differ when this parameter is applied against standard or fifo queues.- Standard: it will solely represent the number of messages requested and consumed in the same request.
- Fifo: the max messages would actually represented as
inFlight
messages (consumed but not yet deleted), meaning that we would not be able to consume further message from the same queue until there is a deletion or thevisibilityTimeout
gets expired. See the official aws docs for further details.
- waitTimeSeconds
The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages. Ensure that the HTTP response timeout of the NettyNioAsyncHttpClient is longer than the WaitTimeSeconds parameter to avoid errors.
- returns
a list of ConsumedMessages of at most 10 messages (maximum configurable per request)
- See also
receiveSingleManualDelete for at least once semantics.
- def receiveSingleManualDelete(queueUrl: QueueUrl, maxMessages: Int = 10, visibilityTimeout: FiniteDuration = 30.seconds, waitTimeSeconds: FiniteDuration = Duration.Zero, onErrorMaxRetries: Int = 1): Task[List[DeletableMessage]]
Single receive message action that responds with a list of deletable messages from the specified
queueUrl
.Single receive message action that responds with a list of deletable messages from the specified
queueUrl
.A DeletableMessage provides the control over when the message is considered as processed, thus can be deleted from the source queue and allow the next message to be consumed.
- queueUrl
source queue url
- maxMessages
max number of message to be consumed, which at most can be 10, otherwise it will fail. The meaning of
maxMessages
can differ when this parameter is applied against standard or fifo queues.- Standard: it will solely represent the number of messages requested and consumed in the same request.
- Fifo: the max messages would actually represented as
inFlight
messages (consumed but not yet deleted), meaning that we would not be able to consume further message from the same queue until there is a deletion or thevisibilityTimeout
gets expired. See the official aws docs for further details.
- visibilityTimeout
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved (in case they have not been deleted before).
- waitTimeSeconds
The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than the wait timeout. By default,
waitTimeSeconds
is set to Duration.Zero, akashort pooling
, which means that it will only consume messages available at that time. On the other hand, the user can switch tolong pooling
by increasing thewaitTimeSeconds
to more than zero, which in that case it will wait for new messages to be available. See more in docs: https://docs.amazonaws.cn/en_us/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling. Notice that inshort polling
(default), if there is no available message because theinFlight
has reached the maximum limits of the queue it will return software.amazon.awssdk.services.sqs.model.OverLimitException, on the other hand, when using long pooling we would just not receive messages. Additionally, ensure that the HTTP response timeout of the NettyNioAsyncHttpClient is longer than the WaitTimeSeconds parameter to avoid timeout errors.- returns
a list of DeletableMessages limited to the configured
maxMessages
(at most 10) and the maximum available in the queue at the given request time.
- See also
receiveSingleAutoDelete for at most once semantics.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()