LrKafkaProducer.reconfigureProducer

Reconfigures the KafkaProducer initialized for the Vuser.

public static void reconfigureProducer(Properties propsToModify)

Arguments

NameDescription
propsToModifyProperties object that contains only those key-value pairs to be modified and/or new pairs to be added. The other configurations remain the same.

Return values

This function does not return any values.

General information

This function reconfigures the producer. It closes the existing producer, modifies the previously defined producer properties with the specified values, and initializes another producer.

In recorded Kafka scripts, the producer is automatically configured during recording and must be reconfigured to include mandatory properties before replay. For details, see Kafka consumer and producer properties in the VuGen help center.