There is no promise/callback method to be able to move on or halt the program based on the output of a bus.send().
For example, if a queue is set to non-transient, an exception is thrown like this:
channel closed by server: 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'queue-name in vhost '/': received 'true' but current is 'false'".
Ideally, the library would would have an api that looks like:
bus.send(..., function (error, response) {}
or promises:
bus.send().then() { // handle success here }.error() { // handle error here}
There is no promise/callback method to be able to move on or halt the program based on the output of a bus.send().
For example, if a queue is set to non-transient, an exception is thrown like this:
channel closed by server: 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - inequivalent arg 'durable' for queue 'queue-name in vhost '/': received 'true' but current is 'false'".
Ideally, the library would would have an api that looks like:
bus.send(..., function (error, response) {} or promises: bus.send().then() { // handle success here }.error() { // handle error here}