@staticmethod
def get_consumer_cfg(config, only, qty):
    """Get the consumers config, possibly filtering the config if only
        or qty is set.

        :param config: The consumers config section
        :type config: helper.config.Config
        :param str only: When set, filter to run only this consumer
        :param int qty: When set, set the consumer qty to this value
        :rtype: dict

        """
    consumers = dict(config.application.Consumers)
    if only:
        for key in list(consumers.keys()):
            if key != only:
                del consumers[key]
        if qty:
            consumers[only]['qty'] = qty
    return consumers
