Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "rascal", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A friendly wrapper around amqplib with safe defaults", | ||
@@ -27,15 +27,3 @@ "main": "index.js", | ||
"author": "Stephen Cresswell", | ||
"license": "ISC", | ||
"directories": { | ||
"example": "examples", | ||
"test": "tests" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/guidesmiths/rascal.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/guidesmiths/rascal/issues" | ||
}, | ||
"homepage": "https://github.com/guidesmiths/rascal" | ||
"license": "ISC" | ||
} |
@@ -1,20 +0,59 @@ | ||
# amqp-nice | ||
# Rascal | ||
A friendly wrapper around amqplib, with express/connect like consumer middleware. Very much a work in process | ||
Rascal is a config driven wrapper around amqplib with mostly* safe defaults | ||
## TODO | ||
prefetch | ||
raising errors | ||
stifling error handlers in tests | ||
## tl;dr | ||
## Configuration | ||
```javascript | ||
var rascal = require('rascal') | ||
var _ = require('lodash').runInContext().mixin({ 'defaultsDeep': require('merge-defaults') }) | ||
var definitions = require('./definitions.json') | ||
## Testing Support | ||
var config = _.defaultsDeep(definitions, rascal.defaults) | ||
### Durability and Exclusiveness | ||
rascal.Broker.create(config, function(err, broker) { | ||
if (err) console.error(err.message) & process.exit(1) | ||
broker.subscribe('s1', function(err, message, content, next) { | ||
console.log(content) | ||
next() | ||
}) | ||
setInterval(function() { | ||
broker.publish('p1', 'This is a test message') | ||
}, 100).unref() | ||
}) | ||
``` | ||
### Namespaces | ||
definitions.json | ||
```json | ||
{ | ||
"vhosts": { | ||
"v1": { | ||
"exchanges": { | ||
"e1": {} | ||
}, | ||
"queues": { | ||
"q1": {} | ||
}, | ||
"bindings": { | ||
"b1": { | ||
"source": "e1", | ||
"destination": "q1" | ||
} | ||
} | ||
} | ||
}, | ||
"publications": { | ||
"p1": { | ||
"exchange": "e1", | ||
"vhost": "v1" | ||
} | ||
}, | ||
"subscriptions": { | ||
"s1": { | ||
"queue": "q1", | ||
"vhost": "v1" | ||
} | ||
} | ||
} | ||
``` | ||
### Purge Queues | ||
### Nuke |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
98318
40
2571
60
1
2
3