public final class SimplifiedProducerRecords
extends java.lang.Object
SimplifiedProducerRecords is collection of SimplifiedProducerRecord object. It is a helper class
to create an equivalent ProducerRecords object as required by Channel.produce(ProducerRecords)| Constructor and Description |
|---|
SimplifiedProducerRecords(java.lang.String jsonSimplifiedProducerRecords)
SimplifiedProducerRecords is a public constructor which takes a single String argument as required by
joptsimple requirement. |
| Modifier and Type | Method and Description |
|---|---|
ProducerRecords |
getProducerRecords()
Create a
ProducerRecords object from the SimplifiedProducerRecords JSON objects specified by user
in the --records CLI parameter. |
public SimplifiedProducerRecords(java.lang.String jsonSimplifiedProducerRecords)
SimplifiedProducerRecords is a public constructor which takes a single String argument as required by
joptsimple requirement. joptsimple internally calls this constructor to convert a
OptionSpec into a SimplifiedProducerRecords object.jsonSimplifiedProducerRecords - JSON string representation of the SimplifiedProducerRecords object
as typed in by the userpublic ProducerRecords getProducerRecords()
ProducerRecords object from the SimplifiedProducerRecords JSON objects specified by user
in the --records CLI parameter. Each element of ProducerRecords is equivalent (e.g.: same topic value,
same payload, same headers, etc.) to its corresponding element of SimplifiedProducerRecords and they are
presented in the same order.ProducerRecords object