lib/rdkafka/consumer.rb
def each
      loop do
        message = poll(250)
        if message
          yield(message)
        else
          if @closing
            break
          else
            next
          end
        end
      end
    end
# Poll for new messages and yield for each received one. Iteration
# will end when the consumer is closed.
#
# If `enable.partition.eof` is turned on in the config this will raise an
# error when an eof is reached, so you probably want to disable that when
# using this method of iteration.
#
# @raise [RdkafkaError] When polling fails
#
# @yieldparam message [Message] Received message
#
# @return [nil]
Poll for new messages and yield for each received one. Iteration
will end when the consumer is closed.

If `enable.partition.eof` is turned on in the config this will raise an
error when an eof is reached, so you probably want to disable that when
using this method of iteration.
Poll for new messages and yield for each received one . Iteration will end when the consumer is closed . If ` enable . partition . eof ` is turned on in the config this will raise an error when an eof is reached so you probably want to disable that when using this method of iteration .
def each
      loop do
        message = poll(250)
        if message
          yield(message)
        else
          if @closing
            break
          else
            next
          end
        end
      end
    end
def each loop do message = poll ( 250 ) if message yield ( message ) else if @closing break else next end end end end
Poll for new messages and yield for each received one.
Poll for new messages and yield for each received one .
None
nil
[RdkafkaError] When polling fails
[ RdkafkaError ] When polling fails
message
None