class Rdkafka::Producer

Public Instance Methods

close(timeout = nil) click to toggle source

return false if producer is forcefully closed, otherwise return true

# File lib/fluent/plugin/out_rdkafka.rb, line 11
def close(timeout = nil)
  @closing = true
  # Wait for the polling thread to finish up
  # If the broker isn't alive, the thread doesn't exit
  if timeout
    thr = @polling_thread.join(timeout)
    return !!thr
  else
    @polling_thread.join
    return true
  end
end