← ZIO SQS docs

SqsStreamSettings

zio.sqs.SqsStreamSettings
See theSqsStreamSettings companion object
final case class SqsStreamSettings(attributeNames: List[QueueAttributeName], maxNumberOfMessages: Option[Int], messageAttributeNames: List[String], visibilityTimeout: Option[Int], waitTimeSeconds: Option[Int], autoDelete: Boolean, stopWhenQueueEmpty: Boolean)

Configuration settings for consuming messages from an SQS queue.

Value parameters

attributeNames

List of queue attribute names to retrieve with each message. See AWS SQS API documentation for valid values.

autoDelete

If true, SqsStream.apply deletes the received messages before it emits them. If false, SqsStream.apply does not delete them; delete them with SqsStream.deleteMessage, SqsStream.deleteMessageBatch or SqsStream.deleteMessageBatchSink. SqsStream.consumeChunkAtLeastOnce ignores this setting.

maxNumberOfMessages

Maximum number of messages to retrieve in a single request. Valid values are between 1 and 10.

messageAttributeNames

List of message attribute names to retrieve with each message.

stopWhenQueueEmpty

If true, the stream stops when a receive request returns no messages. If false, the stream keeps polling for new messages.

visibilityTimeout

The duration (in seconds) that the received messages are hidden from subsequent retrieve requests. If None, uses the queue's default visibility timeout. See AWS SQS Visibility Timeout documentation.

waitTimeSeconds

The duration (in seconds) for which the call waits for messages to arrive in the queue before returning. Maximum is 20 seconds. If None, the stream sends no wait time and SQS applies its own default. A value above 0 enables long polling. Short polling increases the number of requests made to SQS and so the cost.

Attributes

Companion
object
Source
SqsStreamSettings.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withAttributeName(attributeName: QueueAttributeName): SqsStreamSettings

Adds an attribute name to the names requested with each message. The name is added at the front of the list.

Adds an attribute name to the names requested with each message. The name is added at the front of the list.

Attributes

Source
SqsStreamSettings.scala
def withAttributeNames(attributeNames: List[QueueAttributeName]): SqsStreamSettings

Replaces the attribute names requested with each message.

Replaces the attribute names requested with each message.

Attributes

Source
SqsStreamSettings.scala

Sets whether messages are deleted when the stream receives them, before they are processed.

Sets whether messages are deleted when the stream receives them, before they are processed.

Attributes

Source
SqsStreamSettings.scala
def withMaxNumberOfMessages(maxNumberOfMessages: Int): SqsStreamSettings

Sets the maximum number of messages to receive in one request. The valid range is 1 to 10.

Sets the maximum number of messages to receive in one request. The valid range is 1 to 10.

Attributes

Source
SqsStreamSettings.scala

Adds a message attribute name to the names requested with each message. The name is added at the front of the list.

Adds a message attribute name to the names requested with each message. The name is added at the front of the list.

Attributes

Source
SqsStreamSettings.scala

Appends the given message attribute names to the names requested with each message.

Appends the given message attribute names to the names requested with each message.

Attributes

Source
SqsStreamSettings.scala

Sets whether the stream ends when a receive request returns no messages.

Sets whether the stream ends when a receive request returns no messages.

Attributes

Source
SqsStreamSettings.scala

Sets the visibility timeout of received messages, in seconds.

Sets the visibility timeout of received messages, in seconds.

Attributes

Source
SqsStreamSettings.scala

Sets how long a receive request waits for messages, in seconds. A value above 0 enables long polling.

Sets how long a receive request waits for messages, in seconds. A value above 0 enables long polling.

Attributes

Source
SqsStreamSettings.scala

Inherited methods

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala