Coder Social home page Coder Social logo

trendyol / kafka-cronsumer Goto Github PK

View Code? Open in Web Editor NEW
78.0 78.0 13.0 782 KB

Cron based Kafka exception consumer with the power of auto retry & concurrency

Home Page: https://medium.com/trendyol-tech/kafka-konsumer-two-years-journey-3e00b46c9ea3

License: MIT License

Go 98.12% Makefile 1.88%
cron exception-handling go golang kafka

kafka-cronsumer's Issues

Goroutine leak problem

We realized that at every iteration we created new goroutines without releasing previous ones, we can re-use the same goroutines or close and create new ones.

Expose kafkaProducer

Users want to use kafkaProducer in order to publish their messages to an exception topic for the first time.

Instead of they create Kafka producer implementation, we can expose our kafka producer and present them for use.

Consume message when header has expected value

On the consumer side of Kafka topics, we want to ignore some messages or process only some messages depending on the message type. Mostly, message producers send their events with some details on the message header. So, could the cronsumer project gives us a feature about ignoring/accepting messages for a given header key/values.

Client Id

We could add client id configuration to the producer.

producerConf := kafka.WriterConfig{
ClientID: "your-client-id",
...
}

Avoid calling NewAPI for multiple times.

Right now if we have more than one consumer and apiEnabled is true, for every consumer we are creating new api. Instead we can create the api once and use this API for all consumers.

feat: enable/disable cron

Sometimes we have faced big lag of exception/retry topics, In that kind of situation we need close the cron and finish the lag asap so we can provide this feature

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.