Giter Club home page Giter Club logo

zmq_broker_ex's Introduction

ZmqBroker

This is a general broker for ZeroMQ with optional contract checking via json schemas. It allows to create "channels" on the fly via a rest API. It supports PUB/SUB (XPUB/XSUB), PULL/PUSH, REQ/REP (DEALER/ROUTER) brokerage. Also it optionally validates your json data with supplied JSON Schema files.

API

By default the REST API listens to the port 30050

Create / get port of channel

To create a channel or get the port you should connect to, call :

/:channel_name?type=:type&side=:side&in_schema=:in_schema&out_schema=:out_schema

The parameters are :

  • :channel_name : the name of the channel
  • :type : can be pubsub, reqrep, pullpush
  • :side : which side is calling ( pub or sub? req or rep? pull or push?)
  • :in_schema (optional) : the url or path to the json schema file to validate message going from sender to receiver
  • :out_schema (optional) : the url or path to the json schema file to validate replies - only for rep

The answer will be

  { your_port: :port_number }

Where the broker gives you which port you should connect to.

The ports are creating starting from initial port in config, default is 31000

Get the list of the channels

/list

Gives you a list of all the channels with their configuration.

Event Pub Sub Channel

There is a PUB SUB Channel for event broadcasting set up by default on ports 30051 for sub and 30052 for pub. JSON Schema validation errors are broadcasted here. You can publish other events via this channel if you need.

Dockerfile

Dockerfile included, just pull the image producture/zmqbroker to get started quickly.

zmq_broker_ex's People

Contributors

producture avatar

Watchers

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