Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 1.5 KB

README.md

File metadata and controls

37 lines (26 loc) · 1.5 KB

Count Messages

Prerequisite

  • This script uses kafkacat, Please install them for your platform from here
  • This script also assumes the machine on which you are executing it has connection to the Kafka cluster

Overview

This script is used to count number of messages in a Kafka topic

How to execute this script

Step 01: Prepare input file

Prepare input file, Input file should be of the format <TOPIC_NAME>,<INCLUDE_FLAG>

  • TOPIC_NAME - Topic name
  • INCLUDE_FLAG - Flag(Yes/No) to count OR exclude a topic

Step 02: Execute the script

Execute the script by running the command ./get-message-count.sh localhost:9094 /input/demo.txt

  • localhost:9094 is the BOOTSTRAP_SERVERS
  • /input/demo.txt is the path for the input file which was prepared in step 01.

Make sure the script has execute permission by running chmod 0774 get-message-count.sh

Step 03: Validating the results

Script execution will generate html and csv report in reports sub directory. Here is how an report would look like.

image info