Class: Rdkafka::Admin::CreateTopicHandle

Inherits:
Rdkafka::AbstractHandle show all
Defined in:
lib/rdkafka/admin/create_topic_handle.rb

Constant Summary

Constants inherited from Rdkafka::AbstractHandle

Rdkafka::AbstractHandle::REGISTRY

Instance Method Summary collapse

Methods inherited from Rdkafka::AbstractHandle

#pending?, register, remove, #wait

Instance Method Details

#create_resultBoolean

Returns whether the create topic was successful.

Returns:

  • (Boolean)

    whether the create topic was successful



17
18
19
# File 'lib/rdkafka/admin/create_topic_handle.rb', line 17

def create_result
  CreateTopicReport.new(self[:error_string], self[:result_name])
end

#operation_nameString

Returns the name of the operation.

Returns:

  • (String)

    the name of the operation



12
13
14
# File 'lib/rdkafka/admin/create_topic_handle.rb', line 12

def operation_name
  "create topic"
end

#raise_errorObject

Raises:



21
22
23
24
25
26
# File 'lib/rdkafka/admin/create_topic_handle.rb', line 21

def raise_error
  raise RdkafkaError.new(
      self[:response],
      broker_message: CreateTopicReport.new(self[:error_string], self[:result_name]).error_string
  )
end