Method: Kafka::FFI::Message#topic

Defined in:
lib/kafka/ffi/message.rb

#topicnil, String

Returns the name of the Topic the Message was published to.

Returns:

  • (nil)

    Topic information was not available

  • (String)

    Name of the Topic the message was published to.



36
37
38
39
40
41
42
# File 'lib/kafka/ffi/message.rb', line 36

def topic
  if self[:rkt].nil?
    return nil
  end

  self[:rkt].name
end