lib/rabbit_carrots/tasks/rmq.rake in rabbit_carrots-0.1.13 vs lib/rabbit_carrots/tasks/rmq.rake in rabbit_carrots-0.1.14

- old
+ new

@@ -39,13 +39,13 @@ queue.subscribe(block: false, manual_ack: true, prefetch: 10) do |delivery_info, properties, payload| Rails.logger.info "Received from queue: #{queue_name}, Routing Keys: #{routing_keys}" handler_class.handle!(channel, delivery_info, properties, payload) channel.ack(delivery_info.delivery_tag, false) - rescue EventHandlers::Errors::NackMessage, JSON::ParserError => _e + rescue RabbitCarrots::EventHandlers::Errors::NackMessage, JSON::ParserError => _e Rails.logger.info "Nacked message: #{payload}" channel.nack(delivery_info.delivery_tag, false, false) - rescue EventHandlers::Errors::NackAndRequeueMessage => _e + rescue RabbitCarrots::EventHandlers::Errors::NackAndRequeueMessage => _e Rails.logger.info "Nacked and Requeued message: #{payload}" channel.nack(delivery_info.delivery_tag, false, true) rescue StandardError => e Rails.logger.error "Error handling message: #{payload}. Error: #{e.message}" channel.nack(delivery_info.delivery_tag, false, true)