KafkaProducerConnection

sealed abstract class KafkaProducerConnection[F[_]]

KafkaProducerConnection represents a connection to a Kafka broker that can be used to create KafkaProducer instances. All KafkaProducer instances created from an given KafkaProducerConnection share a single underlying connection.

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def metrics: F[Map[MetricName, Metric]]
def produce[K : ([K] =>> KeySerializer[F, K]), V : ([V] =>> ValueSerializer[F, V])](records: ProducerRecords[K, V]): F[F[ProducerResult[K, V]]]
def withSerializers[K, V](keySerializer: KeySerializer[F, K], valueSerializer: ValueSerializer[F, V]): Metrics[F, K, V]

Creates a new KafkaProducer using the provided serializers.

Creates a new KafkaProducer using the provided serializers.

KafkaProducerConnection.stream[F].using(settings).map(_.withSerializers(keySerializer, valueSerializer))
def withSerializersFrom[K, V](settings: ProducerSettings[F, K, V]): F[Metrics[F, K, V]]

Creates a new KafkaProducer in the F context, using serializers from the specified ProducerSettings.

Creates a new KafkaProducer in the F context, using serializers from the specified ProducerSettings.

KafkaProducerConnection.stream[F].using(settings).evalMap(_.withSerializersFrom(settings))