Giter VIP home page Giter VIP logo

barnabas's Introduction

Barnabas

A Kafka messenger

Description

Barnabas simplifies Kafka usage during development by exposing a web interface which is translated to Kafka messages.

Usage

Configuration

Configure the app using the following environment variables:

BROKERS Required. A string with a list of brokers separated by a comma (e.g. 'broker-01:9092,broker-02:9092').

TOPICS Required. A string with a list of topics separated by a comma (e.g. 'topic-one,topic-two').

CLIENT_ID Optional. Uses 'barnabas' by default .

GROUP_ID Optional. Uses 'barnabas-group' with a random unique hash by default. (e.g. 'barnabas-group-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d').

PORT Optional. Uses 29092 by default.

SSL Optional. Set to false by default.

When ssl is true, the following credentials are required.

SSL_CA

SSL_KEY

SSL_CERT

Local

Start the app by running the following command:

npm start

Docker

Build and run the image by running the following command:

docker run -d -p 29092:29092 sombreroron/barnabas

Docker Compose

Create a docker-compose.yml file:
docker-compose.example.yml

Run the following command:

docker-compose up -d

API

Send Message

/:topic (POST)

Send a message to a topic. Payload is used as the message content.

Example

POST http://localhost:29092/my-topic

{
    "foo": "bar"
}

Get Messages

/:topic (GET)

Returns a list of messages that were sent to a topic.

The request body can be used as a query to filter the messages. A body is used with a GET request for ease of use.

Messages are retrieved from the latest offset by default. This can be changed by settings the OFFSET_RESET environment variable.

Example

GET  http://localhost:29092/my-topic

{
    "foo.bar": "baz",
    "foo": "bar"
}

barnabas's People

Contributors

sombreroron avatar davidron-wm avatar davidronni avatar

Stargazers

Sergey avatar Lod Lawson avatar

Watchers

James Cloos avatar  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.