lib/amqp/Subscription.js
File Subscription.js
has 265 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const debug = require('debug')('rascal:Subscription');
const _ = require('lodash');
const format = require('util').format;
const crypto = require('crypto');
const async = require('async');
Function decrypt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function decrypt(algorithm, keyHex, ivHex, encrypted, next) {
Function ackOrNack
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function ackOrNack(session, message, err, options, next) {
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
create(broker, vhost, counter, config, next) {
Function handleChannelError
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function handleChannelError(session, config, removeDisconnectionHandler, attempt, err) {
Avoid too many return
statements within this function. Open
Open
if (err) return subscriberError.handle(session, message, err, options, next);
Avoid too many return
statements within this function. Open
Open
if (arguments.length === 4) return ackOrNack(session, message, err, options, emitOnError.bind(null, session));
Avoid too many return
statements within this function. Open
Open
if (options && options.all) return session._ackAll(message, next);
Avoid too many return
statements within this function. Open
Open
if (message.__rascal_acknowledged) return next(new Error('ackOrNack should only be called once per message'));