vert-x3 / vertx-stack

Vert.x stack
Apache License 2.0
120 stars 48 forks source link

vertx3-eventbus-client callback function not called when access is denied #64

Closed thurber closed 7 years ago

thurber commented 7 years ago

Hi, thanks for your library, I have enjoyed using it!

I've found the following issue has hampered me in certain use cases, and I think it might be a bug:

When attempting to send a message from a vertx3-eventbus-client to a Vertx EventBus bridge, if the bridge does not allow the message, the callback function passed to the send method is not called. I would expect it to be called with an error. Instead, only the client's onerror handler is called.

For example:


var EventBus = require('vertx3-eventbus-client');

var eb = new EventBus('http://localhost:8080/eventbus');

eb.onopen = function() {
  // the bridge at localhost:8080/eventbus doesn't permit 'some/address'
  eb.send('some/address', { key: 'value' }, function(err, res) {
    console.log('Callback err and res: ', err, res); // this doesn't happen
  });

}

eb.onerror = function(e) {
  console.log('General error: ', e); // this does happen
}
pmlopes commented 7 years ago

Issue moved to vert-x3/vertx-web #590 via ZenHub