mateodelnorte / servicebus

Simple service bus for sending events between processes using amqp.
MIT License
420 stars 66 forks source link

Invalid example in readme #66

Closed victor-homyakov closed 8 years ago

victor-homyakov commented 8 years ago

Given example causes an error

bus.listen('my.event', { ack: true }, function (event) {
  event.handle.acknowledge(); // acknowledge a message
  event.handle.ack(); // short hand is also available
  event.handle.reject(); // reject a message
});

because there is no event.handle

mateodelnorte commented 8 years ago

ack/reject requires the https://github.com/mateodelnorte/servicebus-retry middleware, which is mentioned in the note above the example. I'll make that more clear.