KafkaStage

ox.kafka.KafkaStage
object KafkaStage

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
KafkaStage.type

Members list

Extensions

Extensions

extension [K, V](source: Source[ProducerRecord[K, V]])
def mapPublish(settings: ProducerSettings[K, V])(using StageCapacity, Ox): Source[RecordMetadata]

Publish the messages using a producer created with the given settings.

Publish the messages using a producer created with the given settings.

Attributes

Returns

A stream of published records metadata, in the order in which the ProducerRecords are received.

def mapPublish(producer: KafkaProducer[K, V], closeWhenComplete: Boolean)(using StageCapacity, Ox): Source[RecordMetadata]

Publish the messages using the given producer. The producer is closed depending on the closeWhenComplete flag, after all messages are published, or when an exception occurs.

Publish the messages using the given producer. The producer is closed depending on the closeWhenComplete flag, after all messages are published, or when an exception occurs.

Attributes

Returns

A stream of published records metadata, in the order in which the ProducerRecords are received.

extension [K, V](source: Source[SendPacket[K, V]])
def mapPublishAndCommit(producerSettings: ProducerSettings[K, V])(using StageCapacity, Ox): Source[RecordMetadata]

For each packet, first all messages (producer records) from SendPacket.send are sent, using a producer created with the given producerSettings. Then, all messages from SendPacket.commit are committed: for each topic-partition, up to the highest observed offset.

For each packet, first all messages (producer records) from SendPacket.send are sent, using a producer created with the given producerSettings. Then, all messages from SendPacket.commit are committed: for each topic-partition, up to the highest observed offset.

Attributes

Returns

A stream of published records metadata, in the order in which the SendPackets are received.

def mapPublishAndCommit(producer: KafkaProducer[K, V], closeWhenComplete: Boolean)(using StageCapacity, Ox): Source[RecordMetadata]

For each packet, first all messages (producer records) are sent, using the given producer. Then, all messages from SendPacket.commit are committed: for each topic-partition, up to the highest observed offset.

For each packet, first all messages (producer records) are sent, using the given producer. Then, all messages from SendPacket.commit are committed: for each topic-partition, up to the highest observed offset.

The producer is closed depending on the closeWhenComplete flag, after all messages are published, or when an exception occurs.

Value parameters

producer

The producer that is used to send messages.

Attributes

Returns

A stream of published records metadata, in the order in which the SendPackets are received.