KafkaProducer

Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

abstract class Metrics[F[_], K, V] extends KafkaProducer[F, K, V]

KafkaProducer.Metrics extends KafkaProducer to provide access to the underlying producer metrics.

KafkaProducer.Metrics extends KafkaProducer to provide access to the underlying producer metrics.

final implicit implicit class ProducerOps[F[_], K, V](producer: KafkaProducer[F, K, V]) extends AnyVal

Value members

Concrete methods

def apply[F[_]]: ProducerPartiallyApplied[F]
def pipe[F[_], K, V, P](settings: ProducerSettings[F, K, V])(implicit F: Async[F], mk: MkProducer[F]): (F, ProducerRecords[P, K, V]) => ProducerResult[P, K, V]

Creates a KafkaProducer using the provided settings and produces record in batches, limiting the number of records in the same batch using ProducerSettings#parallelism.

Creates a KafkaProducer using the provided settings and produces record in batches, limiting the number of records in the same batch using ProducerSettings#parallelism.

def pipe[F[_] : Concurrent, K, V, P](settings: ProducerSettings[F, K, V], producer: KafkaProducer[F, K, V]): (F, ProducerRecords[P, K, V]) => ProducerResult[P, K, V]

Produces records in batches using the provided KafkaProducer. The number of records in the same batch is limited using the ProducerSettings#parallelism setting.

Produces records in batches using the provided KafkaProducer. The number of records in the same batch is limited using the ProducerSettings#parallelism setting.

def resource[F[_], K, V](settings: ProducerSettings[F, K, V])(implicit F: Async[F], mk: MkProducer[F]): Resource[F, Metrics[F, K, V]]

Creates a new KafkaProducer in the Resource context, using the specified ProducerSettings. Note that there is another version where F[_] is specified explicitly and the key and value type can be inferred, which allows you to use the following syntax.

Creates a new KafkaProducer in the Resource context, using the specified ProducerSettings. Note that there is another version where F[_] is specified explicitly and the key and value type can be inferred, which allows you to use the following syntax.

KafkaProducer.resource[F].using(settings)
def stream[F[_], K, V](settings: ProducerSettings[F, K, V])(implicit F: Async[F], mk: MkProducer[F]): Stream[F, Metrics[F, K, V]]

Creates a new KafkaProducer in the Stream context, using the specified ProducerSettings. Note that there is another version where F[_] is specified explicitly and the key and value type can be inferred, which allows you to use the following syntax.

Creates a new KafkaProducer in the Stream context, using the specified ProducerSettings. Note that there is another version where F[_] is specified explicitly and the key and value type can be inferred, which allows you to use the following syntax.

KafkaProducer.stream[F].using(settings)

Implicits

Implicits

final implicit def ProducerOps[F[_], K, V](producer: KafkaProducer[F, K, V]): ProducerOps[F, K, V]