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
- Source:
- KafkaProducerConnection.scala
Value members
Abstract methods
def produce[P, K : ([K] =>> Serializer[F, K]), V : ([V] =>> Serializer[F, V])](records: ProducerRecords[P, K, V]): F[F[ProducerResult[P, K, V]]]
def withSerializers[K, V](keySerializer: Serializer[F, K], valueSerializer: Serializer[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))
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))