final case class Live[R, K, V](p: KafkaProducer[Array[Byte], Array[Byte]], producerSettings: ProducerSettings, keySerializer: Serializer[R, K], valueSerializer: Serializer[R, V]) extends Service[R, K, V] with Product with Serializable
- Alphabetic
- By Inheritance
- Live
- Serializable
- Product
- Equals
- Service
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Live(p: KafkaProducer[Array[Byte], Array[Byte]], producerSettings: ProducerSettings, keySerializer: Serializer[R, K], valueSerializer: Serializer[R, V])
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 finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def flush: RIO[Blocking, Unit]
Flushes the producer's internal buffer.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val keySerializer: Serializer[R, K]
- def metrics: RIO[Blocking, Map[MetricName, Metric]]
Expose internal producer metrics
- 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()
- val p: KafkaProducer[Array[Byte], Array[Byte]]
- def produce(topic: String, key: K, value: V): RIO[R with Blocking, RecordMetadata]
Produces a single record and await broker acknowledgement.
Produces a single record and await broker acknowledgement. See produceAsync(topic* for version that allows to avoid round-trip-time penalty for each record.
- def produce(record: ProducerRecord[K, V]): RIO[R with Blocking, RecordMetadata]
Produces a single record and await broker acknowledgement.
Produces a single record and await broker acknowledgement. See produceAsync(record* for version that allows to avoid round-trip-time penalty for each record.
- final val produceAll: ZTransducer[R with Blocking, Throwable, ProducerRecord[K, V], RecordMetadata]
A stream transducer that produces all records from the stream.
A stream transducer that produces all records from the stream.
- Definition Classes
- Service
- def produceAsync(topic: String, key: K, value: V): RIO[R with Blocking, Task[RecordMetadata]]
Produces a single record.
Produces a single record. The effect returned from this method has two layers and describes the completion of two actions: 1. The outer layer describes the enqueueing of the record to the Producer's internal buffer. 2. The inner layer describes receiving an acknowledgement from the broker for the transmission of the record.
It is usually recommended to not await the inner layer of every individual record, but enqueue a batch of records and await all of their acknowledgements at once. That amortizes the cost of sending requests to Kafka and increases throughput. See produce(topic* for version that awaits broker acknowledgement.
- def produceAsync(record: ProducerRecord[K, V]): RIO[R with Blocking, Task[RecordMetadata]]
Produces a single record.
Produces a single record. The effect returned from this method has two layers and describes the completion of two actions: 1. The outer layer describes the enqueueing of the record to the Producer's internal buffer. 2. The inner layer describes receiving an acknowledgement from the broker for the transmission of the record.
It is usually recommended to not await the inner layer of every individual record, but enqueue a batch of records and await all of their acknowledgements at once. That amortizes the cost of sending requests to Kafka and increases throughput. See produce(record* for version that awaits broker acknowledgement.
- def produceChunk(records: Chunk[ProducerRecord[K, V]]): RIO[R with Blocking, Chunk[RecordMetadata]]
Produces a chunk of records.
Produces a chunk of records. See produceChunkAsync for version that allows to avoid round-trip-time penalty for each chunk.
- def produceChunkAsync(records: Chunk[ProducerRecord[K, V]]): RIO[R with Blocking, Task[Chunk[RecordMetadata]]]
Produces a chunk of records.
Produces a chunk of records. The effect returned from this method has two layers and describes the completion of two actions: 1. The outer layer describes the enqueueing of all the records to the Producer's internal buffer. 2. The inner layer describes receiving an acknowledgement from the broker for the transmission of the records.
It is possible that for chunks that exceed the producer's internal buffer size, the outer layer will also signal the transmission of part of the chunk. Regardless, awaiting the inner layer guarantees the transmission of the entire chunk.
- val producerSettings: ProducerSettings
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- val valueSerializer: Serializer[R, V]
- 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()