module Kafka

Defined in:

kafka.cr
kafka/configuration.cr
kafka/consumer.cr
kafka/group_info.cr
kafka/group_list.cr
kafka/handle.cr
kafka/message.cr
kafka/metadata.cr
kafka/producer.cr
kafka/queue.cr
kafka/topic.cr
kafka/topic_configuration.cr
kafka/topic_partition.cr
kafka/topic_partition_list.cr
kafka/version.cr

Constant Summary

VERSION = "0.1.0"

Class Method Summary

Instance Method Summary

Class Method Detail

def self.err2name(err : LibKafka::RespErrT) : String #

Returns the error code name (enum name).


[View source]
def self.err2str(err : LibKafka::RespErrT) : String #

Returns a human readable representation of a kafka error.


[View source]
def self.get_debug_contexts : String #

Retrieve supported debug contexts for use with the "debug" configuration property. Returns comma-separated list of available debugging contexts.


[View source]
def self.get_err_descs : Array(LibKafka::ErrDesc) #

FIXME only returning first errdesc Returns the full list of error codes.


[View source]
def self.last_error : LibKafka::RespErrT #

Returns the last error code generated by a legacy API call in the current thread.


[View source]
def self.version : Int32 #

Returns the librdkafka version as integer.


[View source]
def self.version_str : String #

Returns the librdkafka version as string.


[View source]
def self.wait_destroyed(timeout_ms = 1000) : LibC::Int #

Wait for all rd_kafka_t objects to be destroyed.


[View source]

Instance Method Detail

def conf_properties_show #

Prints a table to fp of all supported configuration properties, their default values as well as a description.


[View source]
def errno : LibC::Int #

Returns the thread-local system errno.


[View source]
def errno2err(errnox : LibC::Int) : LibKafka::RespErrT #

Converts the system errno value errnox to a RespErrT error code upon failure from the following functions:

  • rd_kafka_topic_new()
  • rd_kafka_consume_start()
  • rd_kafka_consume_stop()
  • rd_kafka_consume()
  • rd_kafka_consume_batch()
  • rd_kafka_consume_callback()
  • rd_kafka_consume_queue()
  • rd_kafka_produce()

[View source]
def thread_cnt : LibC::Int #

Retrieve the current number of threads in use by librdkafka.


[View source]