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.

Value members

Concrete methods

def apply[F[_]]: ProducerPartiallyApplied[F]
def pipe[F[_], K, V, P](settings: ProducerSettings[F, K, V])(`evidence$2`: ConcurrentEffect[F], `evidence$3`: ContextShift[F]): (F, ProducerRecords[K, V, P]) => ProducerResult[K, V, P]

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[_], K, V, P](settings: ProducerSettings[F, K, V], producer: KafkaProducer[F, K, V])(`evidence$4`: Concurrent[F]): (F, ProducerRecords[K, V, P]) => ProducerResult[K, V, P]

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])(F: ConcurrentEffect[F], context: ContextShift[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])(F: ConcurrentEffect[F], context: ContextShift[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)

Deprecated methods

@deprecated("use KafkaProducer[F].resource(settings)", "1.5.0")
def resource[F[_]](F: ConcurrentEffect[F]): ProducerResource[F]

Alternative version of resource where the F[_] is specified explicitly, and where the key and value type can be inferred from the ProducerSettings. This allows you to use the following syntax.

Alternative version of resource where the F[_] is specified explicitly, and where the key and value type can be inferred from the ProducerSettings. This allows you to use the following syntax.

KafkaProducer.resource[F].using(settings)
Deprecated
@deprecated("use KafkaProducer[F].stream(settings)", "1.5.0")
def stream[F[_]](F: ConcurrentEffect[F]): ProducerStream[F]

Alternative version of stream where the F[_] is specified explicitly, and where the key and value type can be inferred from the ProducerSettings. This allows you to use the following syntax.

Alternative version of stream where the F[_] is specified explicitly, and where the key and value type can be inferred from the ProducerSettings. This allows you to use the following syntax.

KafkaProducer.stream[F].using(settings)
Deprecated