Created
May 4, 2015 21:00
-
-
Save gerad/0e93a2357475621e7ecc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// publish `message` to the "/echo" topic, and call `callback` on response | |
module.exports = function echo(connection, message, callback) { | |
connection.subscribe('/echo', callback); | |
connection.publish('/echo', message); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment