Middleware does not recognise `acknowledge` in options
Opened this issue · 2 comments
remade commented
When subscribing or listening to an event using the servicebus
package and you provide the acknowledgement option as acknowledge: true|false
, the message has no handle property/function
bus.subscribe('info.*', {
routingKey: "info.*",
autoDelete: false,
acknowledge: true, // This line
}, function (message) {
try{
message.handle.acknowledge(); // throws error
}
catch(err){
console.log(err)
}
})
But it works when you use ack: true | false
. The culprit is on line 55 of servicebus-retry/index.js
if ( ! options || ! options.ack) return next(null, channel, msg, options);
mateodelnorte commented
Sounds right. Can you submit a PR?
remade commented
Sure