authorjapps / authorjapps/zerocode

Kafka - Record metadata reading and asserting(optional)

Open
#176 2 comments 0 reactions 1 assignee Claimed by @nirmalchandra View on GitHub
in-progress kafka
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.