ProducerResource

final class ProducerResource[F[_]] extends AnyVal

ProducerResource provides support for inferring the key and value type from ProducerSettings when using KafkaProducer.resource with the following syntax.

ProducerResource provides support for inferring the key and value type from ProducerSettings when using KafkaProducer.resource with the following syntax.

KafkaProducer.resource[F].using(settings)
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

override def toString: String
Definition Classes
Any
def using[K, V](settings: ProducerSettings[F, K, V])(context: ContextShift[F]): Resource[F, Metrics[F, K, V]]

Creates a new KafkaProducer in the Resource context. This is equivalent to using KafkaProducer.resource directly, except we're able to infer the key and value type.

Creates a new KafkaProducer in the Resource context. This is equivalent to using KafkaProducer.resource directly, except we're able to infer the key and value type.