Code Monkey home page Code Monkey logo

kafka-idle-topics's People

Contributors

abraham-leal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kafka-idle-topics's Issues

Connectivity Issue and troubleshooting

Hi Abraham

I am testing the tool and having issues which may be network related but need some way of confirming this

We have a private cluster which is connected to confluent via AWS private links and on-prem AWS Transit gateway and to laptop via VPN.

Command:
~/go/bin/kafka-idle-topics -bootstrap-servers ????.eu-west-1.aws.glb.confluent.cloud:9092 -username ??? -password ?? -kafkaSecurity plain_tls -idleMinutes 43800

Outputs - Attempt 1
2024/01/26 14:25:37 Loading Topics...
2024/01/26 14:25:37 Could not reach cluster within the last 30 seconds. Is the configuration correct? read tcp 172.31.193.152:59524->10.14.163.147:9092: read: connection reset by peer

Output - Attempt 2
2024/01/26 15:47:31 Loading Topics...
2024/01/26 15:47:34 Evaluating Topics that haven't been produced to since... 2023-12-27 05:47:34.83183 +0000 GMT m=-2627996.097033499
2024/01/26 15:47:35 Could not consume from topic: read tcp 172.31.193.152:49521->10.14.163.179:9092: read: connection reset by peer

From the same laptop I can confirm I can consume messages from a topic using the command
kafka-console-consumer --bootstrap-server??.eu-west-1.aws.glb.confluent.cloud:9092 --consumer.config command-nonprod.properties --topic ??????--from-beginning

Any suggests ?

Support Team Issues

We are currently testing the tool and have issues with running the tool as it appears to fail if the topic list being queried is greater that 100+ and is dependant on the topics an api key has.
For a client the tool would work well but for a support team it would mean creating and maintaining over 10 new service accounts as we have over 1000 topics which is not practical. We also would prefer more details in the output as we can not risk removing client topics with proper safeguards.
Is it possible to update the code

  • Resolve the issue with querying large number of topics (may not be possible)

  • Restrict queries to a list in a file or topic prefix rather that the access available to an api-key

  • update the output to include some verification or date last used as well as topic name so we can sort by least active

  • update the docker image to allow the use of the additional parameter (-idleMinutes) that can be used on the command line

Should this exclude dlq topics??

Not really an issue but a Suggestion.
First of all, great tool.. Thanks Abraham.

I ran it for a cluster on CC. It listed dlq topics as well.
dlq topics are connector-created and are required.
I suggest to either flag this as a message, say at the beginning of text file, to carefully decide which topics to be deleted.
For eg; dlq topics, retry topics(created by devs/ applications), error topics (generally created by HTTP Sink Connector)
All these topics are generally empty but still required.

broken pipe errors when executing the utility

Hi,
I was trying to execute this utility against confluent Cloud Kafka to compile a list of idle topics but with whatever setting i run It fails with Broken Pipe Error. The said sever has more than 1500 topics and 600 Consumer groups.

./kafka-idle-topics -bootstrap-servers pkc-****.northeurope.azure.confluent.cloud:9092 -username REMOVED -password REMOVED -kafkaSecurity plain_tls -idleMinutes 43200 -productionAssessmentTimeMs 43200
2023/10/19 17:12:46 Loading Topics...
2023/10/19 17:12:49 Evaluating Topics that haven't been produced to since... 2023-09-19 17:12:49.563518 +0100 BST m=-2591995.340513124
2023/10/19 17:31:53 Evaluating Topics without active Consumer Groups...
2023/10/19 17:31:53 Could not obtain Consumer Groups from cluster: write tcp 192.168.0.48:56237->20.105.49.156:9092: write: broken pipe

Other options that I tried.

./kafka-idle-topics -bootstrap-servers pkc-****.northeurope.azure.confluent.cloud:9092 -username REMOVED -password REMOVED -kafkaSecurity plain_tls -idleMinutes 262800

Could you please help me to identify what is the issue here ?
Thank you
A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.