Sha256: d8a99b293a2711183c8921662b99f5e85674a1ed9c431df627b313f665e0afed

Contents?: true

Size: 481 Bytes

Versions: 31

Compression:

Stored size: 481 Bytes

Contents

require_relative "base_error_handler"
module Pwwka
  module ErrorHandlers
    class IgnorePayloadFormatErrors < BaseErrorHandler
      def handle_error(receiver,queue_name,payload,delivery_info,exception)
        if exception.kind_of?(JSON::JSONError)
          log("Ignoring JSON error",queue_name,payload,delivery_info,exception)
          receiver.nack(delivery_info.delivery_tag)
          abort_chain
        else
          keep_going
        end
      end
    end

  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
pwwka-0.21.1 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.21.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.20.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.19.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.18.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.17.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.16.1 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.16.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.15.1 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.15.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb
pwwka-0.14.0 lib/pwwka/error_handlers/ignore_payload_format_errors.rb