Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rascal

Package Overview
Dependencies
Maintainers
1
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rascal - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

examples/definitions.json

16

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc