lib/karafka/base_responder.rb
def validate_options!
      return true unless self.class.options_schema

      messages_buffer.each_value do |messages_set|
        messages_set.each do |message_data|
          result = self.class.options_schema.call(message_data.last)
          next if result.success?

          raise Karafka::Errors::InvalidResponderMessageOptionsError, result.errors
        end
      end
    end
def validate_options!
      return true unless self.class.options_schema

      messages_buffer.each_value do |messages_set|
        messages_set.each do |message_data|
          result = self.class.options_schema.call(message_data.last)
          next if result.success?

          raise Karafka::Errors::InvalidResponderMessageOptionsError, result.errors
        end
      end
    end
Checks if we met all the options requirements before sending them to the producer.