The administrative client for Kafka, which supports managing and inspecting topics, etc.
More...
#include <AdminClient.h>
|
| AdminClient (const Properties &properties) |
|
admin::CreateTopicsResult | createTopics (const Topics &topics, int numPartitions, int replicationFactor, const Properties &topicConfig=Properties(), std::chrono::milliseconds timeout=std::chrono::milliseconds(DEFAULT_COMMAND_TIMEOUT_MS)) |
| Create a batch of new topics.
|
|
admin::DeleteTopicsResult | deleteTopics (const Topics &topics, std::chrono::milliseconds timeout=std::chrono::milliseconds(DEFAULT_COMMAND_TIMEOUT_MS)) |
| Delete a batch of topics.
|
|
admin::ListTopicsResult | listTopics (std::chrono::milliseconds timeout=std::chrono::milliseconds(DEFAULT_COMMAND_TIMEOUT_MS)) |
| List the topics available in the cluster.
|
|
admin::DeleteRecordsResult | deleteRecords (const TopicPartitionOffsets &topicPartitionOffsets, std::chrono::milliseconds timeout=std::chrono::milliseconds(DEFAULT_COMMAND_TIMEOUT_MS)) |
| Delete records whose offset is smaller than the given offset of the corresponding partition. More...
|
|
const std::string & | clientId () const |
| Get the client id.
|
|
const std::string & | name () const |
| Get the client name (i.e. More...
|
|
void | setLogLevel (int level) |
| Set log level for the kafka client (the default value: 5).
|
|
const Properties & | properties () const |
| Return the properties which took effect.
|
|
Optional< std::string > | getProperty (const std::string &name) const |
| Fetch the effected property (including the property internally set by librdkafka).
|
|
void | pollEvents (std::chrono::milliseconds timeout) |
| Call the OffsetCommit callbacks (if any) Note: The Kafka client should be constructed with option enable.manual.events.poll=true !
|
|
Optional< BrokerMetadata > | fetchBrokerMetadata (const std::string &topic, std::chrono::milliseconds timeout=std::chrono::milliseconds(DEFAULT_METADATA_TIMEOUT_MS), bool disableErrorLogging=false) |
| Fetch matadata from a available broker. More...
|
|
template<class ... Args> |
void | doLog (int level, const char *filename, int lineno, const char *format, Args... args) const |
|
void | doLog (int level, const char *filename, int lineno, const char *msg) const |
|
|
enum | { DEFAULT_METADATA_TIMEOUT_MS = 10000
} |
|
The administrative client for Kafka, which supports managing and inspecting topics, etc.
◆ deleteRecords()
admin::DeleteRecordsResult KAFKA_API::clients::admin::AdminClient::deleteRecords |
( |
const TopicPartitionOffsets & |
topicPartitionOffsets, |
|
|
std::chrono::milliseconds |
timeout = std::chrono::milliseconds(DEFAULT_COMMAND_TIMEOUT_MS) |
|
) |
| |
|
inline |
Delete records whose offset is smaller than the given offset of the corresponding partition.
- Parameters
-
topicPartitionOffsets | a batch of offsets for partitions |
timeout | |
- Returns
The documentation for this class was generated from the following file:
- /home/runner/work/modern-cpp-kafka/modern-cpp-kafka/include/kafka/AdminClient.h