Handle

Base handle, super class for specific clients.

class Handle {}

Members

Functions

getWatermarkOffsets
ErrorCode getWatermarkOffsets(const(char)* topic, int partition, long low, long high)

Get last known low (oldest/beginning) and high (newest/end) offsets for partition.

memberid
auto memberid()

Returns the client's broker-assigned group member id

metadata
Metadata metadata(bool all_topics, Topic only_rkt, int timeout_ms)

Request Metadata from broker.

name
const(char)[] name()

the name of the handle

outqLen
int outqLen()

Returns the current out queue length

pause
ErrorCode pause(TopicPartition[] partitions)

Pause producing or consumption for the provided list of partitions.

poll
int poll(int timeout_ms)

Polls the provided kafka handle for events.

queryWatermarkOffsets
auto queryWatermarkOffsets(const(char)* topic, int partition, long low, long high, int timeout_ms)

Query broker for low (oldest/beginning) and high (newest/end) offsets for partition.

resume
ErrorCode resume(TopicPartition[] partitions)

Resume producing or consumption for the provided list of partitions.

setCommonConfig
void setCommonConfig(GlobalConf conf)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

c_parts_to_partitions
TopicPartition[] c_parts_to_partitions(rd_kafka_topic_partition_list_t* c_parts)

Convert a list of C partitions to C++ partitions

error_cb_trampoline
void error_cb_trampoline(rd_kafka_t* rk, int err, const(char)* reason, void* opaque)
Undocumented in source. Be warned that the author may not have intended to support it.
free_partition_vector
void free_partition_vector(TopicPartition[] v)
Undocumented in source. Be warned that the author may not have intended to support it.
log_cb_trampoline
void log_cb_trampoline(rd_kafka_t* rk, int level, const(char)* fac, const(char)* buf)
Undocumented in source. Be warned that the author may not have intended to support it.
offset_commit_cb_trampoline
void offset_commit_cb_trampoline(rd_kafka_t* rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t* c_offsets, void* opaque)
Undocumented in source. Be warned that the author may not have intended to support it.
open_cb_trampoline
int open_cb_trampoline(const(char)* pathname, int flags, mode_t mode, void* opaque)
Undocumented in source. Be warned that the author may not have intended to support it.
partitions_to_c_parts
rd_kafka_topic_partition_list_t* partitions_to_c_parts(TopicPartition[] partitions)
Undocumented in source. Be warned that the author may not have intended to support it.
rebalance_cb_trampoline
void rebalance_cb_trampoline(rd_kafka_t* rk, rd_kafka_resp_err_t err, rd_kafka_topic_partition_list_t* c_partitions, void* opaque)
Undocumented in source. Be warned that the author may not have intended to support it.
socket_cb_trampoline
int socket_cb_trampoline(int domain, int type, int protocol, void* opaque)
Undocumented in source. Be warned that the author may not have intended to support it.
stats_cb_trampoline
int stats_cb_trampoline(rd_kafka_t* rk, char* json, size_t json_len, void* opaque)
Undocumented in source. Be warned that the author may not have intended to support it.
throttle_cb_trampoline
void throttle_cb_trampoline(rd_kafka_t* rk, const(char)* broker_name, int broker_id, int throttle_time_ms, void* opaque)
Undocumented in source. Be warned that the author may not have intended to support it.
update_partitions_from_c_parts
void update_partitions_from_c_parts(TopicPartition[] partitions, rd_kafka_topic_partition_list_t* c_parts)

@brief Update the application provided 'partitions' with info from 'c_parts'

Variables

dr_cb_
DeliveryReportCb dr_cb_;
Undocumented in source.
event_cb_
EventCb event_cb_;
Undocumented in source.
offset_commit_cb_
OffsetCommitCb offset_commit_cb_;
Undocumented in source.
open_cb_
OpenCb open_cb_;
Undocumented in source.
partitioner_cb_
PartitionerCb partitioner_cb_;
Undocumented in source.
partitioner_kp_cb_
PartitionerKeyPointerCb partitioner_kp_cb_;
Undocumented in source.
rebalance_cb_
RebalanceCb rebalance_cb_;
Undocumented in source.
rk_
rd_kafka_t* rk_;
Undocumented in source.
socket_cb_
SocketCb socket_cb_;
Undocumented in source.

Meta