Coder Social home page Coder Social logo

c-sharp-kafka's Introduction

How to Add a New Topic Consumer & Producer

  1. Add new avsc file under c_sharp_kafka/Schemas. Utilize https://toolslick.com/generation/metadata/avro-schema-from-json to convert known JSON schema to avro file
  2. Start all kafka docker containers running with docker-compose up -d. Confirm they are up with docker-compose ps
  3. Generate cs files from avsc files using this commmand avrogen -s c_sharp_kafka/Schemas/<new_avsc_schema_file>.avsc .
  4. Create new consumer and producer classes for your topic under the c_sharp_kafka/Consumers & c_sharp_kafka/Producers folders respectively using the base classes.
  5. Add your new topic to Program.cs in the case statements to handle them from program arguments
  6. Test new topic production and consumption by changing your args passed into program

NOTE: If developing locally, you may have to remove any previous iterations of avsc schemas by running this command curl -X DELETE http://localhost:8081/subjects/<topic-name>-value

c-sharp-kafka's People

Watchers

William Juang avatar

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.