zerocode icon indicating copy to clipboard operation
zerocode copied to clipboard

Kafka - Record metadata reading and asserting(optional)

Open authorjapps opened this issue 6 years ago • 2 comments

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

authorjapps avatar Dec 28 '18 14:12 authorjapps

Done. Tested Green

  • PR not yet merged.
  • Once merged - this tkt will be resolved.

authorjapps avatar Dec 30 '18 22:12 authorjapps

Implementation, Dev and Test -Done.

  • TODO is

    • HelloWorld
    • Wiki page on How To
  • Also TODO- produce/load with

    • RAW data
    • JSON data

nirmalchandra avatar Jan 04 '19 12:01 nirmalchandra