class SqsProducer extends AnyRef
- Source
- SqsProducer.scala
- Alphabetic
- By Inheritance
- SqsProducer
- 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
- 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 sendParBatch(messages: List[Message], queueUrl: QueueUrl): Task[List[SendMessageBatchResponse]]
Sends a list of
n
messages in parallel.Sends a list of
n
messages in parallel.By design the Sqs batch send request accepts at most 10 entries, but the sendParBatch implementation overcomes that rule by splitting long given lists of
messages
in batches of 10. This is a great enhancement that makes the user not having to deal nor worry about that limitation.- messages
the messages sent to the queue.
- queueUrl
target queue url
- returns
a list of SendMessageBatchResponse with the result of all the batch send requests performed. if the input list of
messages
is:- empty, it returns an empty list
- smaller than 10, it returns a list of a single batch response
- bigger than that it will return as much elements proportional to the module of 10.
- def sendParBatchSink(queueUrl: QueueUrl, onErrorHandleWith: (Throwable) => Task[Ack] = _ => Task.pure(Stop)): Consumer[List[Message], Unit]
Consumer that listens for lists Messages and produces them in parallel batches to the specified
queueUrl
.Consumer that listens for lists Messages and produces them in parallel batches to the specified
queueUrl
.The user does not have to worry about the limitation of the aws sdk that restricts the batch size to 10 messages, since each received list of Messages will be split in batches of at most 10 entries, and they will be produced in parallel to sqs.
- queueUrl
target queue url
- onErrorHandleWith
provides the power to the user to decide what to do in case there was an error producing a message to sqs. by default it Stops, it is recommended to create a custom logic that satisfies the business needs, like logging the error, increasing failed metrics count, etc.
- def sendSingleMessage(message: Message, queueUrl: QueueUrl): Task[SendMessageResponse]
Sends a single message to the specified queue.
- def sendSink(queueUrl: QueueUrl, onErrorHandleWith: (Throwable) => Task[Ack] = _ => Task.pure(Stop)): Consumer[Message, Unit]
Consumer that listens for Messages and produces them at a time to the specified
queueUrl
.Consumer that listens for Messages and produces them at a time to the specified
queueUrl
.- queueUrl
target queue url
- onErrorHandleWith
provides the power to the user to decide what to do in case there was an error producing a message to sqs. by default it Stops, it is recommended to create a custom logic that satisfies the business needs, like logging the error, increasing failed metrics count, etc.
- 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()