Giter Club home page Giter Club logo

ws-collector's Introduction

ws-collector Build Status

Simply put, ws-collector is a WebSocket-based ingestion bridge for configurable message queue back-end. It supports ingestion for any Websockets compatable publisher.

Supports:

  • Any JSON-based message format
  • Token-based client authentication
  • Supports Apache Kafka, RabbitMQ, MQTT

Installation

You can install ws-collector by either cloning this repo (below) or by downloading the latest binary distribution.

git clone [email protected]:mchmarny/ws-collector.git
cd ./ws-collector

To start the server simply invoke the ws-collector executable

./ws-collector

Configuration

The ws-collector comes with a configuration file located in the root of the application (config.json). You can use that file to thange the server and backend configuration parameters:

{
   "id": "c1",
   "trace": true,
   "server": {
    "root": "/ws",
    "host": "127.0.0.1",
    "port": 8080,
    "token":""
    },
   "backend": {
    "type":"kafka",
    "uri":"localhost:9092",
    "args": {
        ...
    }
   }
}

Note, when runtime is Cloud Foundry the following configuration attributes are going to be set to CF environment variables:

id = VCAP_APPLICATION.instance_id + VCAP_APPLICATION.instance_index
server.port = VCAP_APPLICATION.port
server.host = VCAP_APPLICATION.host
backend.uri = VCAP_SERVICES[x].credentials.uri

Backends

Currently ws-collector supports two MQ backends:

RabbitMQ

"service_name": "queue",
"exchange": "messages",
"exchange_type": "direct",
"route": "messages"

A sample of the RabbitMQ backend arguments can be foound in config-amqp-sample.json file

Apache Kafka

"topic": "jobs",
"partition": 0,
"buffer_time_in_sec": 3,
"timeout_in_sec": 3

A sample of the Kafka backend arguments can be foound in config-kafka-sample.json file

Apache Kafka

"topic": "jobs",
"qos": 0

A sample of the Kafka backend arguments can be foound in config-mqtt-sample.json file

License

This project is under the MIT License. See the LICENSE file for the full license text.

ws-collector's People

Contributors

mchmarny avatar

Stargazers

 avatar  avatar

Watchers

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

Forkers

saadqaisar

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.