def subscribe_to_queue(consumer_class)
      queue = channel.queue(consumer_class.queue_name, durable: true,
        arguments: { 'x-ha-policy' => 'all' })

      queue.subscribe(manual_ack: true) do |delivery_info, properties, message|
        process_message(consumer_class, delivery_info, properties, message)
      end

      logger.info "Subscribed #{consumer_class} to #{consumer_class.queue_name}"
    end
def subscribe_to_queue(consumer_class)
      queue = channel.queue(consumer_class.queue_name, durable: true,
        arguments: { 'x-ha-policy' => 'all' })

      queue.subscribe(manual_ack: true) do |delivery_info, properties, message|
        process_message(consumer_class, delivery_info, properties, message)
      end

      logger.info "Subscribed #{consumer_class} to #{consumer_class.queue_name}"
    end
Declare a queue and subscribe to it

 @param consumer_class [Class] to subscribe to