Packages

p

zio.kafka

producer

package producer

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

Type Members

  1. type ByteRecord = ProducerRecord[Array[Byte], Array[Byte]]
  2. trait Producer extends AnyRef
  3. sealed abstract class ProducerCompression extends AnyRef
  4. sealed trait ProducerEvent extends AnyRef
  5. final case class ProducerSettings(closeTimeout: zio.Duration = 30.seconds, sendBufferSize: Int = 4096, authErrorRetrySchedule: Schedule[Any, Throwable, Any] = Schedule.stop, properties: Map[String, AnyRef] = Map.empty, diagnostics: ProducerDiagnostics = Producer.NoDiagnostics, metricLabels: Set[MetricLabel] = Set.empty) extends Product with Serializable

    Settings for the Producer.

    Settings for the Producer.

    To stay source compatible with future releases, you are recommended to construct the settings as follows:

    ProducerSettings(bootstrapServers)
      .withLinger(500.millis)
      .withCompression(ProducerCompression.Zstd(3))
      .... etc.
  6. trait Transaction extends AnyRef
  7. trait TransactionalProducer extends AnyRef

    A producer that produces records transactionally.

  8. final case class TransactionalProducerSettings extends Product with Serializable

    Settings for a transactional producer.

    Settings for a transactional producer.

    To stay source compatible with future releases, you are recommended to construct the settings as follows:

    val producerSettings = ProducerSettings(bootstrapServers)
      .withLinger(500.millis)
      .withCompression(ProducerCompression.Zstd(3))
      .... etc.
    TransactionalProducerSettings(producerSettings, transactionalId)

Value Members

  1. object Producer
  2. object ProducerCompression

    The compression codecs that Kafka supports while producing records.

  3. object ProducerEvent

    Diagnostics events for the Producer.

    Diagnostics events for the Producer.

    The producer always handles records in batches. Even single records results in batches of 1. The diagnostic events are therefore always about batches.

    For each batch the RecordsOffered event is emitted first, followed by the RecordsSent event. Since batches are queued in the producer and sending one batch might go faster than the previous, the two event types can come in any order. However, the RecordsOffered events are always in the order the batches were offered.

    To associate events to a batch you can use the batchId field. This is an ever-increasing number that is unique per producer and starts at 0. When a RecordsOffered and a RecordsSent event are for the same batch, the batchId and records fields have the same value.

    Batches of 0 records do not result in events.

  4. object ProducerSettings extends Serializable
  5. object TransactionalProducer
  6. object TransactionalProducerSettings extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped