node-amqp-connection-manager icon indicating copy to clipboard operation
node-amqp-connection-manager copied to clipboard

about “ createChannel“ not use confirm mode?

Open kangjianfeng opened this issue 7 years ago • 1 comments

hi, the function "createChannel" use confirm mode, how to use "not confirmation mode"? thank?

the lib>ChannelWrapper.js code below:

ChannelWrapper.prototype._onConnect = function(arg) {
      var connection;
      connection = arg.connection;
      this._connection = connection;
      return connection.createConfirmChannel().then((function(_this) {
        return function(channel) {
          _this._channel = channel;
          channel.on('close', function() {
            return _this._onChannelClose(channel);
          });
          return _this._settingUp = Promise.all(_this._setups.map(function(setupFn) {
            return pb.call(setupFn, null, channel)["catch"](function(err) {
              if (_this._channel) {
                return _this.emit('error', err, {
                  name: _this.name
                });
              } else {
.............

i modify :

return connection.createChannel().then((function(_this) {

but it not work. how use no confirm mode? thanks!

kangjianfeng avatar Dec 15 '17 08:12 kangjianfeng

Would function 'waitForConnect' help? https://github.com/benbria/node-amqp-connection-manager/blob/master/src/ChannelWrapper.coffee#L166

Freakachoo avatar Feb 21 '18 11:02 Freakachoo