Skip to content

senecajs/seneca-redis-queue-transport

Repository files navigation

Seneca

A Seneca.js transport plugin

seneca-redis-queue-transport

npm version Build Status Gitter

This plugin provides transport for micro-service messages via Redis (list based) queues. This lets you send messsages via redis.

ALSO READ: The seneca-transport readme has lots of introductory material about message transports. Start there if you have not used a message transport before.

  • Node: 4, 6
  • License: MIT

seneca-redis-queue-transport's source can be read in an annotated fashion by,

  • running npm run annotate
  • viewing online.

The annotated source can be found locally at ./doc/redis-queue-transport.html.

If you're using this module, and need help, you can:

If you are new to Seneca in general, please take a look at senecajs.org. We have everything from tutorials to sample apps to help get you up and running quickly.

Seneca compatibility

Supports Seneca versions 1.x - 3.x

Install

To install, simply use npm. Remember you will need to install Seneca.js if you haven't already.

npm install seneca-redis-queue-transport

You'll also need redis.

To run tests with Docker

Build the Redis Docker image:

npm run build

Start the Redis container:

npm run start

Stop the Redis container:

npm run stop

While the container is running you can run the tests into another terminal:

npm run test

Quick Example

require('seneca')()
  .use('redis-queue-transport')
  .add('foo:two',function(args,done){ done(null,{bar:args.bar}) })
  .client( {type:'redis-queue',pin:'foo:one,bar:*'} )
  .listen( {type:'redis-queue',pin:'foo:two,bar:*'} )

Available Options

require('seneca')()
  .use('redis-queue-transport', {
    'redis-queue': {
      timeout: 22222,
      type: 'redis-queue',
      host: 'localhost',
      port: 6379
    }
  })

Contributing

The Senecajs org encourage open participation. If you feel you can help in any way, be it with documentation, examples, extra testing, or new features please get in touch.

License

Copyright Richard Rodger and other contributors 2015-2016, Licensed under MIT.

About

Seneca micro-services message transport with Redis queues

Resources

License

Stars

Watchers

Forks

Packages

No packages published