Packages

p

zio.sqs

producer

package producer

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. producer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type ErrorOrEvent[T] = Either[ProducerError[T], ProducerEvent[T]]

    Specifies the result of publishing en event.

    Specifies the result of publishing en event. The result either an error zio.sqs.producer.ProducerError or the event itself zio.sqs.producer.ProducerEvent

  2. trait Producer[T] extends AnyRef

    Producer that can be used to publish an event of type T to SQS queue An instance of producer should be instantiated before publishing.

    Producer that can be used to publish an event of type T to SQS queue An instance of producer should be instantiated before publishing.

    // when publishing strings with the provided `client` to the given `queueUrl`
    producer = Producer.make(client, queueUrl, Serializer.serializeString)
    T

    type of the event to publish

  3. final case class ProducerError[T](senderFault: Boolean, code: String, message: Option[String], event: ProducerEvent[T]) extends RuntimeException with Product with Serializable

    Encodes an error for the published message Fields senderFault, code, message correspond to the respective fields in BatchResultErrorEntry

    Encodes an error for the published message Fields senderFault, code, message correspond to the respective fields in BatchResultErrorEntry

    T

    type of the event.

    senderFault

    whether the error happened due to the caller of the batch API action.

    code

    an error code representing why the action failed on this entry.

    message

    a message explaining why the action failed on this entry.

    event

    event that caused this failure.

  4. final case class ProducerEvent[T](data: T, attributes: Map[String, MessageAttributeValue], groupId: Option[String], deduplicationId: Option[String], delay: Option[Duration] = None) extends Product with Serializable

    Event to publish to SQS.

    Event to publish to SQS.

    T

    type of the payload for the event.

    data

    payload to publish.

    attributes

    a map of attributes to set.

    groupId

    assigns a specific message group to the message.

    deduplicationId

    token used for deduplication of sent messages.

    delay

    in order to delay delivery of the message. Allowed values: 0 to 15 minutes.

  5. final case class ProducerSettings(batchSize: Int = 10, duration: Duration = 500.millisecond, parallelism: Int = 16, retryDelay: Duration = 250.millisecond, retryMaxCount: Int = 10) extends Product with Serializable

    Settings for the producer.

    Settings for the producer.

    batchSize

    size of the batch to use. Up to 10 messages can be buffered and sent as a batch request.

    duration

    time to wait for the batch to be full (have the specified batchSize).

    parallelism

    number of concurrent requests to make to SQS.

    retryDelay

    time to wait before retrying event republishing if it failed with a recoverable error.

    retryMaxCount

    the number of retries to make for a posted event.

Value Members

  1. object Producer
  2. object ProducerError extends Serializable
  3. object ProducerEvent extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped