Created
November 16, 2012 21:22
-
-
Save wwhurley/4091037 to your computer and use it in GitHub Desktop.
DerbyJS model manipulation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var model = store.createModel(); | |
// Creation of AMQP connection, exchange and queue | |
model.subscribe('messages', function(err, messages) { | |
model.on('set', 'messages.*', function(id, message) { | |
exchange.publish('collector', message); | |
}); | |
queue.subscribe(function (message, headers, deliveryInfo) { | |
model.set('messages.' + message.id, message); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment