streamr-broker
Main executable for running a broker node in Streamr Network.
Last updated 8 days ago by streamr-dev .
Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install streamr-broker 
SYNC missed versions from official npm registry.

Broker

Main executable for running a broker node in Streamr Network.

The broker node extends the minimal network node provided by the network library with

  • client-facing support for foreign protocols (e.g. HTTP, MQTT) via adapters
  • support for long-term persistence of data via Apache Cassandra.

Developing

Project uses npm for package management.

  • Start off by installing required dependencies with npm ci
  • To run tests npm test

Running

It is convenient to run a broker node as part of the full Streamr stack. To run a copy of the full Streamr stack, see the streamr-docker-dev tool.

If instead you want to run a broker node by itself without Docker, follow the steps below.

First install the package

npm install -g streamr-broker

Then run the command broker with the desired configuration file

broker <configFile>

See folder "configs" for example configurations, e.g., to run a simple local broker

broker configs/development-1.env.json

Then run the command tracker with default values

tracker

Publishing

Publishing to NPM is automated via Travis CI. Follow the steps below to publish.

  1. Update version with either npm version patch, npm version minor, or npm version major. Use semantic versioning https://semver.org/. Files package.json and package-lock.json will be automatically updated, and an appropriate git commit and tag created.
  2. git push --follow-tags
  3. Wait for Travis CI to run tests
  4. If tests passed, Travis CI will publish the new version to NPM

API Specification

For production version refer to API Explorer.

Protocol Specification

Messaging protocol is described in streamr-specs PROTOCOL.md.

MQTT special considerations

  • MQTT topic names are mapped to stream names (and not stream ids.) This behavior may change in the future.
  • For authentication put API_KEY in password connection field
  • MQTT native clients are able to send plain text, but their payload will be transformed to JSON {"mqttPayload":"ORIGINAL_PLAINTEXT_PAYLOAD}

Generating fixture self signed certificate

To regenerate self signed certificate in ./test/fixtures run:

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 36500 -nodes -subj \'/CN=localhost\'

Error handling:

  • If API_KEY is not correct, client will receive "Connection refused, bad user name or password" (returnCode: 4)
  • If stream is not found, client will receive "Connection refused, not authorized" (returnCode: 5)

Current Tags

  • 11.0.1                                ...           latest (8 days ago)

52 Versions

  • 11.0.1                                ...           8 days ago
  • 11.0.0                                ...           16 days ago
  • 10.1.1                                ...           a month ago
  • 10.1.0                                ...           a month ago
  • 10.0.0                                ...           2 months ago
  • 9.0.3                                ...           3 months ago
  • 9.0.0                                ...           3 months ago
  • 8.10.0                                ...           3 months ago
  • 8.9.0                                ...           3 months ago
  • 8.8.0                                ...           4 months ago
  • 8.7.1                                ...           5 months ago
  • 8.7.0                                ...           5 months ago
  • 8.6.9                                ...           6 months ago
  • 8.6.8                                ...           6 months ago
  • 8.6.7                                ...           6 months ago
  • 8.6.5                                ...           6 months ago
  • 8.6.4                                ...           7 months ago
  • 8.6.3                                ...           7 months ago
  • 8.6.2                                ...           8 months ago
  • 8.6.1                                ...           8 months ago
  • 8.6.0                                ...           8 months ago
  • 8.5.1                                ...           8 months ago
  • 8.5.0                                ...           8 months ago
  • 8.4.0                                ...           8 months ago
  • 8.3.2                                ...           8 months ago
  • 8.3.1                                ...           8 months ago
  • 8.3.0                                ...           9 months ago
  • 8.2.2                                ...           9 months ago
  • 8.2.1                                ...           9 months ago
  • 8.2.0                                ...           9 months ago
  • 8.1.4                                ...           9 months ago
  • 8.1.3                                ...           9 months ago
  • 8.1.2                                ...           9 months ago
  • 8.1.1                                ...           9 months ago
  • 8.1.0                                ...           9 months ago
  • 8.0.0                                ...           9 months ago
  • 7.0.4                                ...           9 months ago
  • 7.0.3                                ...           9 months ago
  • 7.0.2                                ...           9 months ago
  • 7.0.0                                ...           9 months ago
  • 6.0.4                                ...           9 months ago
  • 6.0.3                                ...           9 months ago
  • 6.0.2                                ...           9 months ago
  • 6.0.1                                ...           9 months ago
  • 6.0.0                                ...           9 months ago
  • 5.1.0                                ...           9 months ago
  • 5.0.8                                ...           9 months ago
  • 5.0.7                                ...           10 months ago
  • 5.0.5                                ...           10 months ago
  • 5.0.4                                ...           10 months ago
  • 5.0.3                                ...           10 months ago
  • 5.0.2                                ...           10 months ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 11
Last Month 58
Dependencies (22)
Dev Dependencies (12)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |