{"id":18279235,"url":"https://github.com/shafreeck/kafka-cli","last_synced_at":"2025-04-05T04:31:37.235Z","repository":{"id":57512273,"uuid":"110926570","full_name":"shafreeck/kafka-cli","owner":"shafreeck","description":"A command line client of kafka","archived":false,"fork":false,"pushed_at":"2017-12-06T14:53:32.000Z","size":25,"stargazers_count":20,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T22:23:03.724Z","etag":null,"topics":["client","client-side","kafka"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shafreeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-16T05:18:25.000Z","updated_at":"2022-09-27T09:47:54.000Z","dependencies_parsed_at":"2022-09-26T17:51:37.527Z","dependency_job_id":null,"html_url":"https://github.com/shafreeck/kafka-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafreeck%2Fkafka-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafreeck%2Fkafka-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafreeck%2Fkafka-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shafreeck%2Fkafka-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shafreeck","download_url":"https://codeload.github.com/shafreeck/kafka-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289382,"owners_count":20914463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["client","client-side","kafka"],"created_at":"2024-11-05T12:27:58.572Z","updated_at":"2025-04-05T04:31:32.208Z","avatar_url":"https://github.com/shafreeck.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kafka-cli\n\n## Install\n\n```\ngo get github.com/shafreeck/kafka-cli\n```\n\n## Usage\n\n```\nkafka-cli is a console util tool to access kafka cluster\n\nUsage:\n  kafka-cli [command]\n\nAvailable Commands:\n  consume     consume topic from kafka\n  monitor     display kafka cluster metrics, TODO\n  produce     TODO\n  topics      list all topics\n\nFlags:\n      --brokers string                    broker list, delimited by comma (default \"127.0.0.1:9092\")\n      --buffersize int                    internal channel buffer size (default 256)\n      --clientid string                   a user-provided string sent with every request to the brokers for logging debugging, and auditing purposes (default \"kafka-cli\")\n      --config string                     config file (default is $HOME/.kafka-cli.yaml)\n      --metadata.refresh duration         metadata refresh frequency (default 10m0s)\n      --metadata.retry.backoff duration   backoff between retrying (default 250ms)\n      --metadata.retry.max int            total number to request metadata when the cluster has a leader election (default 3)\n      --net.dialtimeout duration          timeout of dialing to brokers (default 30s)\n      --net.keepalive duration            keepalive period, 0 means disabled\n      --net.maxopenrequests int           how many outstanding requests a connection is allowed to have before sending on it blocks (default 5)\n      --net.readtimeout duration          timeout of reading messages (default 30s)\n      --net.writetimeout duration         timeout of writing messages (default 30s)\n  -v, --verbose                           print log messages\n      --zookeepers string                 zookeeper server list, delimited by comma, only use when operate topic (default \"127.0.0.1:9093\")\n\nUse \"kafka-cli [command] --help\" for more information about a command.\n```\n\n## List all topics\n\n```\n./kafka-cli --brokers 127.0.0.1:9092 topics\ntopic           partition[replicaid...]:offset ...\n--------------------------------------------------\nunexpected-logs 0[0]:12285581\noutput-pod2     0[0]:9725580\ndefault-topic   0[0]:13971093\ntest            0[0]:5\nfilebeats       0[0]:12488893   1[0]:11301355   2[0]:11301353   3[0]:11301197   4[0]:11301197   5[0]:11301197   6[0]:11301200   7[0]:11301356\n```\n\n## Create topics\n\n```\n./kafka-cli --brokers 127.0.0.1:9092 --zookeepers 127.0.0.1:2181 topics create  t1 t2 t3 --partitions 10 --replicas 3\n```\n\n## Delete topics\n\n```\n./kafka-cli --brokers 127.0.0.1:9092 --zookeepers 127.0.0.1:2181 topics delete  t1 t2 t3\n```\n\n## Consume topics\n\n```\n./kafka-cli --brokers 127.0.0.1:9092 consume default-topic unexpected-logs\n```\n\n## Produce messages\n\nTODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshafreeck%2Fkafka-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshafreeck%2Fkafka-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshafreeck%2Fkafka-cli/lists"}