authorjapps / authorjapps/zerocode
Kafka - Record metadata reading and asserting(optional)
- Dominant language
- Java
- Stars
- 1k
- Forks
- 453
- Avg merge
- 7d 2h
- Merged PRs (30d)
- 5
Description
> 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.
```java
LOGGER.info("Record sent with key " + index
+ ", to partition " + metadata.partition()
+ ", with offset " + metadata.offset());
```
e.g.
```json
"assertions": {
"status" : "Ok",
"recordMetadata" : {
"topicPartition" : {
"partition" : 0,
"topic" : "demo-4"
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.