Closed ZachBray closed 9 years ago
@pkhanal @dpwspoon @cmebarrow Should we prioritize this ?
@sanjay-saxena can provide more input on this issue.
@sbadugu -- Without spending any significant time investigating this issue, it seems like a bug. I will let the PMs decide whether it should be prioritized.
@sanjay-saxena Let's bring this in our sprint planning meeting and see if we can prioritize this for next sprint.
Note that AMQP 0-9-1 Javascript API does not specify any parameter for passing an error-handler into bindQueue()
function which is invoked like this:
var channel = ...;
var config = {queue: myQueueName,
exchange: myExchangeName,
routingKey: key};
channel.bindQueue(config, callback);
And, here is some context:
Long time ago, we had decided to not support passing in an error-handler explicitly into each of our publicly exposed Javascript API functions. Instead, we had decided to support a listener-based mechanism where an application can register an error-handler on the channel object like this:
channel.addEventListener("error", function(e) {
log("CHANNEL ERROR: " + e.message);
});
AMQP Javascript Client HowTo shows how to build an app using AMQP JS client library.
I was investigating how to provide an error callback for functions like
channel.bindQueue(...)
because it isn't specified clearly in the jsdoc and I stumbled across the following issue.AmqpChannel.js
makes use of_enqueueAction(...)
in many places. For example:However, it never passes more than 4 arguments to
_enqueueAction(...)
, which means thedefaultErrorCallable
callback will always be used.In the guide it looks like the writer was expecting to be able to pass an error callback into these methods. For example:
I would expect to be able to provide an error callback parameter or for my callback parameter to be invoked with an error.