Skip to content

Commit

Permalink
Extracted persistence to a seperate module, aedes-persistence.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Nov 30, 2015
1 parent a8a1056 commit d922abe
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 1,000 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Creates a new instance of Aedes.
Options:

* `mq`: an instance of [MQEmitter](http://npm.im/mqemitter).
* `persistence`: an instance of [AedesPersistence](http://npm.im/aedes-persistence).
* `concurrency`: the max number of messages delivered concurrently,
defaults to `100`.
* `heartbeatInterval`: the interval at which the broker heartbeat is
Expand Down Expand Up @@ -274,7 +275,7 @@ Disconnects the client
* [x] Support counting the number of offline clients and subscriptions
* [x] Performance optimizations for QoS 1 and Qos 2
* [x] Add `client#publish()` and `client#subscribe()`
* [ ] move the persistence in a separate module
* [x] move the persistence in a separate module
* [ ] mongo persistence (external module)
* [ ] redis persistence (external module)
* [ ] levelup persistence (external module)
Expand Down
6 changes: 3 additions & 3 deletions aedes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

var mqemitter = require('mqemitter')
var EE = require('events').EventEmitter
var Client = require('./lib/client')
var util = require('util')
var memory = require('./lib/persistence')
var memory = require('aedes-persistence')
var through = require('through2')
var parallel = require('fastparallel')
var series = require('fastseries')
var shortid = require('shortid')
var Packet = require('./lib/packet')
var Packet = require('aedes-packet')
var bulk = require('bulk-write-stream')
var reusify = require('reusify')
var Client = require('./lib/client')

module.exports = Aedes

Expand Down
2 changes: 1 addition & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var EE = require('events').EventEmitter
var util = require('util')
var eos = require('end-of-stream')
var empty = new Buffer(0)
var Packet = require('./packet')
var Packet = require('aedes-packet')
var write = require('./write')
var QoSPacket = require('./qos-packet')
var handleSubscribe = require('./handlers/subscribe')
Expand Down
14 changes: 0 additions & 14 deletions lib/packet.js

This file was deleted.

308 changes: 0 additions & 308 deletions lib/persistence.js

This file was deleted.

2 changes: 1 addition & 1 deletion lib/qos-packet.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

var Packet = require('./packet')
var Packet = require('aedes-packet')
var util = require('util')

function QoSPacket (original, client) {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"tape": "^4.0.0"
},
"dependencies": {
"aedes-packet": "^1.0.0",
"aedes-persistence": "^1.0.0",
"bulk-write-stream": "^1.0.0",
"end-of-stream": "^1.1.0",
"fastfall": "^1.0.0",
Expand Down
Loading

0 comments on commit d922abe

Please sign in to comment.