Coder Social home page Coder Social logo

nano-stream-amqp's Introduction

nano-stream-amqp

npm version

A tiny and performant client that streams block data from a Nano currency node to an AMQP exchange for use in things like RabbitMQ.

It builds on the socket stream of block data set up by the nano-stream-x library.

Installation

Install both nano-stream-x and nano-stream-amqp as global packages:

npm install --global nano-stream-x
npm install --global nano-stream-amqp

Usage

Start the stream

nano-stream-x

This will start a streaming server on 127.0.0.1:3000. To override these:

nano-stream-x host=ip6-localhost port=3001

Start the AMQP client

nano-stream-amqp

By default you will connect to amqp://guest:guest@localhost:5672. This URL includes authentication for your AMQP server in the format amqp://<username>:<password>@<host>:<port>. To connect to a different host, or with different credentials:

nano-stream-amqp host=amqp://my_user:my_pass@localhost:5672

Data will be sent to the default exchange amq.topic. To set a different exchange:

nano-stream-amqp exchange=my_exchange

To set a routing key:

nano-stream-amqp routing_key=my_routing_key

Set a number of publishing options like immediate, headers and many more through the publishing_opts argument as a stringified JSON value. See the node-ampq docs for full options.

nano-stream-amqp publishing_opts='{"mandatory":true}'

Configure your Nano node to send data to nano-stream-x

Your Nano node is easily configured to send block processing data to a server (in this case nano-stream-x). See the wiki article (external link) for how to set this up.

nano-stream-amqp's People

Contributors

lukes avatar

Watchers

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