Stack Exchange
rabbitmq client subscribe channel listeners give memory leakage warning
My code is as shown below : 
scheduler.js
const callMethodForeverRabbitMq = () => {


    cron.schedule('*/1 * * * * *', function () {

        console.log('rabbitmq is calling');


        rabbitMqClientPipeline.subscribeWalletChannel((err, data) => {
            console.log('rabbitmq subscribe called');
            if (!err) {
                console.log('message is ' + data);
            }
        })
    });


};

rabbitmq.js
const subscribeWalletChannel = (cb) => {

    console.log('subscribe method called');

    client.subscribe('channel_name', function () {
        client.on('message', function (topic, message, packet) {
            console.log("Received '" + message + "' on '" + topic + "'");
            return cb(null, message);
        });
    });

}

As soon as I run this code, it gives me the warning:  
0|app      | (node:8973) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit

