Giter Site home page Giter Site logo

kafka-transceiver-rs's Introduction

kafka-transceiver-rs

kafka-transceiver-rs is a versatile Kafka message handling service written in Rust. It is designed to function as both a Sender and a Receiver, depending on its configuration.

Features

  1. Sender Functionality: The Sender consumes messages from a Kafka Topic and forwards them via HTTP requests to a Receiver service.
  2. Receiver Functionality: The Receiver exposes a /kafka-receive endpoint to accept HTTP requests from the Sender. Upon receiving a message, it forwards the message to its own Kafka instance.
  3. Dual Role: Both the Sender and Receiver functionalities are encapsulated within the same program. The role it plays (Sender or Receiver) is determined by its configuration.
  4. Independent Kafka Instances: The Sender and Receiver each interact with their own separate Kafka instances.

This project offers a compact and efficient solution for Kafka message transmission, making it a valuable tool for distributed systems.

Startup

See help for more information.

$ cargo run -- help

Sender

# Run help
$ cargo run -- sender --help
# Run service
$ cargo run -- sender --kafka-address localhost:9092 --kafka-topic test_topic --kafka-group_id=sender-consumer-group --receiver-endpoint localhost:8080/kafka-receive

Receiver

# Run help
$ cargo run -- receiver --help
# Run service
$ cargo run -- receiver --kafka-address localhost:9092 --port 8080

Architecture

+-----------------+          +-----------------+
|                 |          |                 |
| +-------------+ |          | +-------------+ |
| |             | |          | |             | |
| |    Kafka    | |          | |    Kafka    | |
| |             | |          | |             | |
| +-------------+ |          | +-------------+ |
|        |        |          |        ^        |
|        |        |          |        |        |
|    recv msg     |          |    send msg     |
|        |        |          |        |        |
|        v        |          |        |        |
| +-------------+ |          | +-------------+ |
| |             | |          | |             | |
| |  TRX-Sender |-----http---->| TRX-Receiver| |
| |             | |          | |             | |
| +-------------+ |          | +-------------+ |
|                 |          |                 |
+-----------------+          +-----------------+
 Internal-Network              External-Network

kafka-transceiver-rs's People

Contributors

elricli avatar

Watchers

 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.