_consumeCB(cmd, needAck = false) {
		return ({ message, delivery }) => {
			const result = this.incomingMessage(cmd, message.body);

			if (needAck) {
				if (isPromise(result)) {
					return result
						.then(() => {
							if (this.connection) {
								delivery.accept();
							}
						})
						.catch(err => {
							this.logger.error("Message handling error.", err);
							if (this.connection) {
								delivery.reject();
							}

							this.broker.broadcastLocal("$transporter.error", {
								error: err,
								module: "transporter",
								type: C.FAILED_REQUEST_ACK
							});
						});
				} else {
					if (this.connection) {
						delivery.accept();
					}
				}
			}

			return result;
		};
	}
Build a function to handle requests.

@param {String} cmd
@param {Boolean} needAck

@memberof Amqp10Transporter