Class: Rdkafka::Callbacks::BaseHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/rdkafka/callbacks/base_handler.rb

Overview

Base class for admin background-event result handlers.

Each subclass handles one librdkafka admin result event type: it extracts the result from the event, looks up the matching AbstractHandle in the registry and resolves it (sets the response, builds the report, copies the broker message, then unlocks it).

The event is owned by the application and destroyed by BackgroundEventCallback right after dispatch, so handlers must copy everything they need out of event-owned memory into Ruby objects before returning.

Class Method Summary collapse

Class Method Details

.call(event_ptr) ⇒ void

This method returns an undefined value.

Processes a background event for the operation this handler is responsible for.

Parameters:

  • event_ptr (FFI::Pointer)

    pointer to the event

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/rdkafka/callbacks/base_handler.rb', line 21

def call(event_ptr)
  raise NotImplementedError, "#{name} must implement .call"
end