You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: runner_spec.rb
    path of file: ./repos/racecar/spec
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require "stringio"

class TestConsumer < Racecar::Consumer
  subscribes_to "greetings"

  attr_reader :messages

  def initialize
    @messages = []
    @processor_queue = []
    
    
  def poll(timeout)
    # just stop after a big amount of messages read, which is easier to figure out when to
    # exactly stop when reading from multiple topics
    @runner.stop if (@poll_count += 1) >= 10

    msg = @kafka.received_messages[@topic][@internal_offset]
    @internal_offset += 1
    msg
  end