LrKafkaProducer.send
Calls the send method on the KafkaProducer initialized for the Vuser.
public static Future<RecordMetadata> send(ProducerRecord<K, V> record)
public static Future<RecordMetadata> send(ProducerRecord<K, V> record, Callback callback)
Arguments
Name | Description |
---|---|
record | Producer record of appropriate key, value type |
callback | Callback object that will be executed on completion of the send |
Return Values
This function returns a future object from which you can retrieve metadata when it is finished: Future<RecordMetadata>.
General information
This function sends a ProducerRecord<Key,Value> to the server and returns a future object from which you can retrieve metadata when it is finished.
The form with a callback allows you to pass a callback as you would with the standard Kafka producer, that accept RecordMetadata and an exception as parameters on completion (RecordMetadata recordMetadata, Exception e).