We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de11a78 commit cd6cc2cCopy full SHA for cd6cc2c
index.js
@@ -35,7 +35,17 @@ QueueWrapper.prototype.initialiseQueue = function () {
35
}
36
37
// public send function
38
-QueueWrapper.prototype.send = function (message, done) {
+QueueWrapper.prototype.send = function (address, data, done) {
39
+ let message = ''
40
+ if (typeof data === 'function') {
41
+ done = data
42
+ message = address
43
+ } else {
44
+ const serializedData = typeof data === 'object' ? JSON.stringify(data) : data
45
+ const encodedData = new Buffer(serializedData).toString('base64')
46
+ message = address + '|' + encodedData
47
+ }
48
+
49
const send = () => {
50
let options = {
51
qname: this.options.name,
0 commit comments