kafka_producer_class: R6 Class for Kafka Producer

Description Public fields Methods

Description

R6 Class for Kafka Producer

R6 Class for Kafka Producer

Public fields

java_producer

reference to the underlying Java object Initialize

Methods

Public methods


Method new()

Create a new producer object. Instead of kafka_producer_class$new() one can use kafka_producer()

Usage
kafka_producer_class$new()
Returns

returns object reference for method chaining


Method finalize()

Code run when object is removed from session

Usage
kafka_producer_class$finalize()

Method start()

Spin up producer and connect it to Kafka cluster

Usage
kafka_producer_class$start()
Returns

returns object reference for method chaining


Method end()

Disconnect producer from Kafka cluster

Usage
kafka_producer_class$end()
Returns

returns object reference for method chaining


Method restart()

Disconnect and reconnect producer from Kafka cluster

Usage
kafka_producer_class$restart()
Returns

returns object reference for method chaining


Method running()

Whether or not producer is active (has been started or not)

Usage
kafka_producer_class$running()
Returns

TRUE/FALSE


Method props()

Retrieving current current set of properties. If properties are supplied via props parameter thos properties will be set.

Usage
kafka_producer_class$props(..., .properties = NULL)
Arguments
...

a series of properties provided as key = "values"

.properties

a list of properties provided as .properties = list(key = "values", ...)

Returns

returns a list of properties


Method send()

Usage
kafka_producer_class$send(topic, msg, key = NULL, partition = NULL)
Arguments
topic

topic to send messaged to

msg

message to be send or character vector of messages to be send

key

TBD

partition

TBD

Returns

returns self for method chaining


Method clone()

The objects of this class are cloneable with this method.

Usage
kafka_producer_class$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


petermeissner/kafkaesque documentation built on Oct. 17, 2020, 8:55 p.m.