Giter Site home page Giter Site logo

confluent.kafka's People

Contributors

dogac00 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

confluent.kafka's Issues

Provide Configuration for AddKafkaConsumer

Currently, AddKafkaConsumer extension method is overloaded and accepting a lot of different parameters. One solution is builder pattern but I think it will be easier to provide a KafkaConfig class and expect it in AddKafkaConsumer method to provide extra configuration of kafka clusters, brokers, producers and consumers.

Fix Producing back to Main Topic

We shouldn't produce event to main topic in case of failure because other consumers in other domains can listen to our main topic.

  • Produce to "retry" topic.
  • Consume "retry" topic in specific periods.
  • Put unconsumed messages to "error" topic.

Support for Custom Serializer/Deserializer

As of now,

  • Primitive types is serialized/deserialized with big endian byte ordering.
  • String type is serialized/deserialized with UTF8 charset.
  • Custom types is serialized/deserialized in JSON format.

We can support for Serializer/Deserializer for types TKey and TValue for the type that derives from KafkaConsumer.

Add Retry Consumer and Retry Topic

Producing failed messages back to main topic can cause many confusions in other consumers that are successfully parsing and processing messages. In addition, there will be multiple processing of messages in other consumer groups that are listening to the same topic.

Built-in support for Retry consumer will fix these issues. Producing unprocessed messages to retry topic and periodically consuming those messages is one strategy.

Make KafkaConsumer Generic

Currently, KafkaConsumer deserializes messages in UTF8 string format.

We could support deserialization/serialization of complex types.

Example:

public class ProductConsumer : KafkaConsumer<Ignore, Product>
{
    // ...
}

Implement Builder Pattern in ServiceCollection

Currently we have many overloaded constructors in ServiceCollectionExtensions. We can provide ease of use with builder pattern or options parameter.

Example:

services.AddKafkaConsumer(options => {
    options.Topic("topic");
    options.RetryTopic("retry-topic");
    options.BootstrapServers("my-bootstrap-servers");
})

// Or like this:

services.AddKafkaConsumer()
    .Topic("topic")
    .RetryTopic("retry-topic")
    .MaxRetryCount(5);

Support Serialization/Deserialization of Custom Types

We should support both serialization/deserialization of custom types using JSON format. (Other formats can be provided in the future)

We should also support string serialization/deserialization in UTF8 format. (Other formats can be provided in the future)

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.