Packages

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.

// 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

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

Abstract Value Members

  1. abstract def produce(e: ProducerEvent[T]): Task[ProducerEvent[T]]

    Publishes a single event and fails the task.

    Publishes a single event and fails the task.

    e

    event to produce.

    returns

    result of the operation. Task fails if the server returns an error.

  2. abstract def produceBatch(es: Iterable[ProducerEvent[T]]): Task[Iterable[ProducerEvent[T]]]

    Publishes a batch of events.

    Publishes a batch of events.

    es

    events to publish.

    returns

    result of publishing. The returned collection contains the same items that were published. Task fails if the server returns an error for any of the provided events.

  3. abstract def produceBatchE(es: Iterable[ProducerEvent[T]]): Task[Iterable[ErrorOrEvent[T]]]

    Publishes a batch of events.

    Publishes a batch of events.

    es

    events to publish.

    returns

    result of publishing. The returned collection contains zio.sqs.producer.ErrorOrEvent Doesn't fail the Task if the server returns an error for any of the provided events. Instead, the resulting collection contains either the error for the given event or the published event itself. Task completes when all input events were processed (published to the server or failed with an error).

  4. abstract def sendSink: ZSink[Any, Throwable, Iterable[ProducerEvent[T]], Nothing, Unit]

    Sink that can be used to publish events.

    Sink that can be used to publish events. Fails if the server returns an error for any of the published events.

    returns

    sink for publishing.

  5. abstract def sendStream: (Stream[Throwable, ProducerEvent[T]]) ⇒ ZStream[Any, Throwable, ProducerEvent[T]]

    Stream that takes events to publish and produces a stream with published events.

    Stream that takes events to publish and produces a stream with published events. Fails if the server returns an error for any of the published events.

    // ZIO version = RC17
    producer.use { p =>
      p.sendStream(Stream(events: _*))
        .foreach(_ => ...)
    }
    // ZIO version > RC17
    producer.use { p =>
      Stream(events: _*)
        .via(p.sendStream)
        .foreach(_ => ...)
    }
    returns

    stream with published events.

  6. abstract def sendStreamE: (Stream[Throwable, ProducerEvent[T]]) ⇒ ZStream[Any, Throwable, ErrorOrEvent[T]]

    Stream that takes the events and produces a stream with the results.

    Stream that takes the events and produces a stream with the results.

    returns

    stream with published events or errors zio.sqs.producer.ErrorOrEvent. Task completes when all input events were processed (published to the server or failed with an error).

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped