Module: vertx-kafka-client-js/kafka_producer

Classes

KafkaProducer

Methods

(static) KafkaProducer.create(vertx, config, keyType, valueType) → {KafkaProducer}

Create a new KafkaProducer instance
Parameters:
Name Type Description
vertx Vertx Vert.x instance to use
config Array.<string> Kafka producer configuration
keyType todo class type for the key serialization
valueType todo class type for the value serialization
Source:
Returns:
an instance of the KafkaProducer
Type
KafkaProducer

(static) KafkaProducer.createShared(vertx, name, config, keyType, valueType) → {KafkaProducer}

Get or create a KafkaProducer instance which shares its stream with any other KafkaProducer created with the same name
Parameters:
Name Type Description
vertx Vertx Vert.x instance to use
name string the producer name to identify it
config Array.<string> Kafka producer configuration
keyType todo class type for the key serialization
valueType todo class type for the value serialization
Source:
Returns:
an instance of the KafkaProducer
Type
KafkaProducer