Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A success/error callback on send & publish #48

Closed
JeffreyTaylor opened this issue Apr 19, 2015 · 1 comment
Closed

A success/error callback on send & publish #48

JeffreyTaylor opened this issue Apr 19, 2015 · 1 comment

Comments

@JeffreyTaylor
Copy link

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}

@mateodelnorte
Copy link
Owner

Yep. This is something I've been meaning to do, but haven't gotten the time yet. Happy to view a pull request if you want to submit one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants