Coder Social home page Coder Social logo

arodriguezdlc / n2kafka Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redborder/n2kafka

0.0 2.0 0.0 583 KB

Tool that listen on a given port and throw all data received to a kafka topic

License: GNU Affero General Public License v3.0

Makefile 0.35% Shell 11.42% C 87.35% C++ 0.14% Objective-C 0.75%

n2kafka's Introduction

n2kafka

Build Status Coverage Status

Network to kafka translator. It (currently) support conversion from tcp/udp raw sockets and HTTP POST to kafka messages, doing message-processing if you need to.

Setup

To use it, you only need to do a typical ./configure && make && make install

Usage

Basic usage

In order to send raw tcp messages from port 2056, to mymessages topic, using 40 threads, you need to use this config file:

{
	"listeners":[
		{"proto":"tcp","port":2056,"num_threads":40}
	],
	"brokers":"localhost",
	"topic":"mymessages"
}

And launch n2kafka using ./n2kafka <config_file>. You can also use udp and http as proto values. If you want to listen in different ports, you can add as many listeners as you want.

Recommended config parameters

You can also use this parameters in config json root to improve n2kafka behavior:

  • "blacklist":["192.168.101.3"], that will ignore requests of this directions (useful for load balancers)
  • All librdkafka. options. If a config option starts with rdkafka.<option>, <option> will be passed directly to librdkafka config, so you can use whatever config you need. Recommended options are:
    • "rdkafka.socket.max.fails":"3"
    • "rdkafka.socket.keepalive.enable":"true"
    • "delivery.report.only.error":"true"

n2kafka's People

Contributors

eugpermar avatar bigomby avatar

Watchers

James Cloos avatar Alberto Rodríguez 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.