lib/phobos/actions/process_batch.rb in phobos-2.1.2 vs lib/phobos/actions/process_batch.rb in phobos-2.1.3

- old
+ new

@@ -2,10 +2,11 @@ module Phobos module Actions class ProcessBatch include Phobos::Instrumentation + include Phobos::Log attr_reader :metadata def initialize(listener:, batch:, listener_metadata:) @listener = listener @@ -24,10 +25,14 @@ Phobos::Actions::ProcessMessage.new( listener: @listener, message: message, listener_metadata: @listener_metadata ).execute - @listener.consumer.trigger_heartbeat + begin + @listener.consumer.trigger_heartbeat + rescue Kafka::HeartbeatError => e + log_warn("Error sending Heartbeat #{e.class.name}-#{e}") + end end end end end end