Skip to content

Kafka - Record metadata reading and asserting(optional) #176

@authorjapps

Description

@authorjapps

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"
                    }
                }
            }

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions