Closed eddieajau closed 8 years ago
Yup. The option is enableConfirms
. Would be happy to have a README.md PR for it.
Here's an example:
var config = require('cconfig')();
var servicebus = require('servicebus');
var bus = servicebus.bus({
enableConfirms: true,
prefetch: config.SERVICEBUS_PREFETCH,
url: config.RABBITMQ_URL
});
module.exports = bus;
Note, enableConfirms
enables the following functionality on RabbitMQ: https://www.rabbitmq.com/confirms.html. Without it, it's not possible to know when your message has been sent successfully.
Hi Matt. Do you have any documentation on how to use the
RabbitMQBus.send
with the callback? Looking at the code, it seems coupled to theconfirmChannel
option and I'm not quite getting how that all works.The use-case I'm looking at is a serial event chain where want to make sure that after processing one event, I've successfully sent it to the next queue before ack-ing.
Thanks in advance.