zerocode
zerocode copied to clipboard
Kafka - Record metadata reading and asserting(optional)
RecordMetadata metadata = producer.send(record).get();
Currently the framework logs the info as below, but it's better to retrieve it in the response if it was available.
LOGGER.info("Record sent with key " + index
+ ", to partition " + metadata.partition()
+ ", with offset " + metadata.offset());
e.g.
"assertions": {
"status" : "Ok",
"recordMetadata" : {
"topicPartition" : {
"partition" : 0,
"topic" : "demo-4"
}
}
}
Done. Tested Green
- PR not yet merged.
- Once merged - this tkt will be resolved.
Implementation, Dev and Test -Done.
-
TODO is
- HelloWorld
- Wiki page on
How To
-
Also TODO- produce/load with
- RAW data
- JSON data