public interface KafkaAdminClient
Modifier and Type | Method and Description |
---|---|
Future<Void> |
alterConfigs(Map<ConfigResource,Config> configs)
Like
alterConfigs(Map, Handler) but returns a Future of the asynchronous result |
void |
alterConfigs(Map<ConfigResource,Config> configs,
Handler<AsyncResult<Void>> completionHandler)
Update the configuration for the specified resources with the default options
|
Future<Void> |
alterConsumerGroupOffsets(String groupId,
Map<TopicPartition,OffsetAndMetadata> offsets)
Like
alterConsumerGroupOffsets(String, Map, Handler) but returns a Future of the asynchronous result |
void |
alterConsumerGroupOffsets(String groupId,
Map<TopicPartition,OffsetAndMetadata> offsets,
Handler<AsyncResult<Void>> completionHandler)
Alter committed offsets for a set of partitions in a consumer group.
|
Future<Void> |
close()
Like
close(Handler) but returns a Future of the asynchronous result |
void |
close(Handler<AsyncResult<Void>> handler)
Close the admin client
|
Future<Void> |
close(long timeout)
Like
close(long, Handler) but returns a Future of the asynchronous result |
void |
close(long timeout,
Handler<AsyncResult<Void>> handler)
Close the admin client
|
static KafkaAdminClient |
create(Vertx vertx,
org.apache.kafka.clients.admin.AdminClient adminClient)
Create a new KafkaAdminClient instance
|
static KafkaAdminClient |
create(Vertx vertx,
Map<String,String> config)
Create a new KafkaAdminClient instance
|
static KafkaAdminClient |
create(Vertx vertx,
Properties config)
Create a new KafkaAdminClient instance
|
Future<List<org.apache.kafka.common.acl.AclBinding>> |
createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings)
Like
createAcls(List) (ListFuture of the asynchronous result |
void |
createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings,
Handler<AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
Create the ACL rules.
|
Future<Void> |
createPartitions(Map<String,NewPartitions> partitions)
Like
createPartitions(Map, Handler) but returns a Future of the asynchronous result |
void |
createPartitions(Map<String,NewPartitions> partitions,
Handler<AsyncResult<Void>> completionHandler)
Creates a batch of new partitions in the Kafka topic
|
Future<Void> |
createTopics(List<NewTopic> topics)
Like
createTopics(List, Handler) but returns a Future of the asynchronous result |
void |
createTopics(List<NewTopic> topics,
Handler<AsyncResult<Void>> completionHandler)
Creates a batch of new Kafka topics
|
Future<List<org.apache.kafka.common.acl.AclBinding>> |
deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings)
Like
deleteAcls(List) (ListFuture of the asynchronous result |
void |
deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings,
Handler<AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
Delete the ACL rules.
|
Future<Void> |
deleteConsumerGroupOffsets(String groupId,
Set<TopicPartition> partitions)
Like
deleteConsumerGroupOffsets(String, Set, Handler) but returns a Future of the asynchronous result |
void |
deleteConsumerGroupOffsets(String groupId,
Set<TopicPartition> partitions,
Handler<AsyncResult<Void>> completionHandler)
Delete committed offsets for a set of partitions in a consumer group.
|
Future<Void> |
deleteConsumerGroups(List<String> groupIds)
Like
deleteConsumerGroups(List, Handler) but returns a Future of the asynchronous result |
void |
deleteConsumerGroups(List<String> groupIds,
Handler<AsyncResult<Void>> completionHandler)
Delete consumer groups from the cluster.
|
Future<Map<TopicPartition,org.apache.kafka.clients.admin.DeletedRecords>> |
deleteRecords(Map<TopicPartition,org.apache.kafka.clients.admin.RecordsToDelete> recordsToDelete)
Like
deleteRecords(Map, Handler) but returns a Future of the asynchronous result |
void |
deleteRecords(Map<TopicPartition,org.apache.kafka.clients.admin.RecordsToDelete> recordsToDelete,
Handler<AsyncResult<Map<TopicPartition,org.apache.kafka.clients.admin.DeletedRecords>>> completionHandler)
Delete records from a topic partition.
|
Future<Void> |
deleteTopics(List<String> topicNames)
Like
deleteTopics(List, Handler) but returns a Future of the asynchronous result |
void |
deleteTopics(List<String> topicNames,
Handler<AsyncResult<Void>> completionHandler)
Deletes a batch of Kafka topics
|
Future<List<org.apache.kafka.common.acl.AclBinding>> |
describeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter)
Like
describeAcls(AclBindingFilter, Handler) but returns a Future of the asynchronous result |
void |
describeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter,
Handler<AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
Describe the ACL rules.
|
Future<ClusterDescription> |
describeCluster()
Like
describeCluster(Handler) but returns a Future of the asynchronous result |
Future<ClusterDescription> |
describeCluster(DescribeClusterOptions options)
Like
describeCluster(DescribeClusterOptions, Handler) but returns a Future of the asynchronous result |
void |
describeCluster(DescribeClusterOptions options,
Handler<AsyncResult<ClusterDescription>> completionHandler)
Like
describeCluster(Handler) but allows customized options. |
void |
describeCluster(Handler<AsyncResult<ClusterDescription>> completionHandler)
Describe the nodes in the cluster with the default options
|
Future<Map<ConfigResource,Config>> |
describeConfigs(List<ConfigResource> configResources)
Like
describeConfigs(List, Handler) but returns a Future of the asynchronous result |
void |
describeConfigs(List<ConfigResource> configResources,
Handler<AsyncResult<Map<ConfigResource,Config>>> completionHandler)
Get the configuration for the specified resources with the default options
|
Future<Map<String,ConsumerGroupDescription>> |
describeConsumerGroups(List<String> groupIds)
Like
describeConsumerGroups(List, Handler) but returns a Future of the asynchronous result |
Future<Map<String,ConsumerGroupDescription>> |
describeConsumerGroups(List<String> groupIds,
DescribeConsumerGroupsOptions options)
Like
describeConsumerGroups(List, DescribeConsumerGroupsOptions, Handler) but returns a Future of the asynchronous result |
void |
describeConsumerGroups(List<String> groupIds,
DescribeConsumerGroupsOptions options,
Handler<AsyncResult<Map<String,ConsumerGroupDescription>>> completionHandler)
Like
describeConsumerGroups(List, Handler) but allows customized options |
void |
describeConsumerGroups(List<String> groupIds,
Handler<AsyncResult<Map<String,ConsumerGroupDescription>>> completionHandler)
Describe some group ids in the cluster, with the default options
|
Future<Map<Integer,Map<String,org.apache.kafka.clients.admin.LogDirDescription>>> |
describeLogDirs(List<Integer> brokers)
Like
describeLogDirs(List, Handler) but returns a Future of the asynchronous result |
void |
describeLogDirs(List<Integer> brokers,
Handler<AsyncResult<Map<Integer,Map<String,org.apache.kafka.clients.admin.LogDirDescription>>>> completionHandler)
Query the information of all log directories on the given set of brokers
|
Future<Map<String,TopicDescription>> |
describeTopics(List<String> topicNames)
Like
describeTopics(List, Handler) but returns a Future of the asynchronous result |
Future<Map<String,TopicDescription>> |
describeTopics(List<String> topicNames,
DescribeTopicsOptions options)
Like
describeTopics(List, DescribeTopicsOptions, Handler) but returns a Future of the asynchronous result |
void |
describeTopics(List<String> topicNames,
DescribeTopicsOptions options,
Handler<AsyncResult<Map<String,TopicDescription>>> completionHandler)
Like
describeTopics(List, Handler) but allows for customised otions |
void |
describeTopics(List<String> topicNames,
Handler<AsyncResult<Map<String,TopicDescription>>> completionHandler)
Describe some topics in the cluster, with the default options.
|
default Future<Map<TopicPartition,OffsetAndMetadata>> |
listConsumerGroupOffsets(String groupId)
Like
listConsumerGroupOffsets(String, Handler) but returns a Future of the asynchronous result |
default void |
listConsumerGroupOffsets(String groupId,
Handler<AsyncResult<Map<TopicPartition,OffsetAndMetadata>>> completionHandler)
List the consumer group offsets available in the cluster.
|
Future<Map<TopicPartition,OffsetAndMetadata>> |
listConsumerGroupOffsets(String groupId,
ListConsumerGroupOffsetsOptions options)
Like
listConsumerGroupOffsets(String, ListConsumerGroupOffsetsOptions, Handler) but returns a Future of the asynchronous result |
void |
listConsumerGroupOffsets(String groupId,
ListConsumerGroupOffsetsOptions options,
Handler<AsyncResult<Map<TopicPartition,OffsetAndMetadata>>> completionHandler)
List the consumer group offsets available in the cluster.
|
Future<List<ConsumerGroupListing>> |
listConsumerGroups()
Like
listConsumerGroups(Handler) but returns a Future of the asynchronous result |
void |
listConsumerGroups(Handler<AsyncResult<List<ConsumerGroupListing>>> completionHandler)
Get the the consumer groups available in the cluster with the default options
|
Future<Map<TopicPartition,ListOffsetsResultInfo>> |
listOffsets(Map<TopicPartition,OffsetSpec> topicPartitionOffsets)
Like
#listOffsets(Map but returns a Future of the asynchronous result |
void |
listOffsets(Map<TopicPartition,OffsetSpec> topicPartitionOffsets,
Handler<AsyncResult<Map<TopicPartition,ListOffsetsResultInfo>>> completionHandler)
List the offsets available for a set of partitions.
|
Future<Set<String>> |
listTopics()
Like
listTopics(Handler) but returns a Future of the asynchronous result |
void |
listTopics(Handler<AsyncResult<Set<String>>> completionHandler)
List the topics available in the cluster with the default options.
|
static KafkaAdminClient create(Vertx vertx, org.apache.kafka.clients.admin.AdminClient adminClient)
vertx
- Vert.x instance to useadminClient
- Kafka native Admin client instancestatic KafkaAdminClient create(Vertx vertx, Map<String,String> config)
vertx
- Vert.x instance to useconfig
- Kafka admin client configurationstatic KafkaAdminClient create(Vertx vertx, Properties config)
vertx
- Vert.x instance to useconfig
- Kafka admin client configurationvoid listTopics(Handler<AsyncResult<Set<String>>> completionHandler)
completionHandler
- handler called on operation completed with the topics setFuture<Set<String>> listTopics()
listTopics(Handler)
but returns a Future
of the asynchronous resultvoid describeTopics(List<String> topicNames, Handler<AsyncResult<Map<String,TopicDescription>>> completionHandler)
topicNames
- the names of the topics to describecompletionHandler
- handler called on operation completed with the topics descriptionsvoid describeTopics(List<String> topicNames, DescribeTopicsOptions options, Handler<AsyncResult<Map<String,TopicDescription>>> completionHandler)
describeTopics(List, Handler)
but allows for customised otionsFuture<Map<String,TopicDescription>> describeTopics(List<String> topicNames)
describeTopics(List, Handler)
but returns a Future
of the asynchronous resultFuture<Map<String,TopicDescription>> describeTopics(List<String> topicNames, DescribeTopicsOptions options)
describeTopics(List, DescribeTopicsOptions, Handler)
but returns a Future
of the asynchronous resultvoid createTopics(List<NewTopic> topics, Handler<AsyncResult<Void>> completionHandler)
topics
- topics to createcompletionHandler
- handler called on operation completedFuture<Void> createTopics(List<NewTopic> topics)
createTopics(List, Handler)
but returns a Future
of the asynchronous resultvoid deleteTopics(List<String> topicNames, Handler<AsyncResult<Void>> completionHandler)
topicNames
- the names of the topics to deletecompletionHandler
- handler called on operation completedFuture<Void> deleteTopics(List<String> topicNames)
deleteTopics(List, Handler)
but returns a Future
of the asynchronous resultvoid createPartitions(Map<String,NewPartitions> partitions, Handler<AsyncResult<Void>> completionHandler)
partitions
- partitions to createcompletionHandler
- handler called on operation completedFuture<Void> createPartitions(Map<String,NewPartitions> partitions)
createPartitions(Map, Handler)
but returns a Future
of the asynchronous resultpartitions
- void describeConfigs(List<ConfigResource> configResources, Handler<AsyncResult<Map<ConfigResource,Config>>> completionHandler)
configResources
- the resources (topic and broker resource types are currently supported)completionHandler
- handler called on operation completed with the configurationsFuture<Map<ConfigResource,Config>> describeConfigs(List<ConfigResource> configResources)
describeConfigs(List, Handler)
but returns a Future
of the asynchronous resultvoid alterConfigs(Map<ConfigResource,Config> configs, Handler<AsyncResult<Void>> completionHandler)
configs
- The resources with their configs (topic is the only resource type with configs that can be updated currently)completionHandler
- handler called on operation completedFuture<Void> alterConfigs(Map<ConfigResource,Config> configs)
alterConfigs(Map, Handler)
but returns a Future
of the asynchronous resultvoid listConsumerGroups(Handler<AsyncResult<List<ConsumerGroupListing>>> completionHandler)
completionHandler
- handler called on operation completed with the consumer groups idsFuture<List<ConsumerGroupListing>> listConsumerGroups()
listConsumerGroups(Handler)
but returns a Future
of the asynchronous resultvoid describeConsumerGroups(List<String> groupIds, Handler<AsyncResult<Map<String,ConsumerGroupDescription>>> completionHandler)
groupIds
- the ids of the groups to describecompletionHandler
- handler called on operation completed with the consumer groups descriptionsFuture<Map<String,ConsumerGroupDescription>> describeConsumerGroups(List<String> groupIds)
describeConsumerGroups(List, Handler)
but returns a Future
of the asynchronous resultvoid describeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options, Handler<AsyncResult<Map<String,ConsumerGroupDescription>>> completionHandler)
describeConsumerGroups(List, Handler)
but allows customized optionsFuture<Map<String,ConsumerGroupDescription>> describeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options)
describeConsumerGroups(List, DescribeConsumerGroupsOptions, Handler)
but returns a Future
of the asynchronous resultvoid describeCluster(Handler<AsyncResult<ClusterDescription>> completionHandler)
completionHandler
- handler called on operation completed with the cluster descriptionFuture<ClusterDescription> describeCluster()
describeCluster(Handler)
but returns a Future
of the asynchronous resultvoid describeCluster(DescribeClusterOptions options, Handler<AsyncResult<ClusterDescription>> completionHandler)
describeCluster(Handler)
but allows customized options.Future<ClusterDescription> describeCluster(DescribeClusterOptions options)
describeCluster(DescribeClusterOptions, Handler)
but returns a Future
of the asynchronous resultvoid describeLogDirs(List<Integer> brokers, Handler<AsyncResult<Map<Integer,Map<String,org.apache.kafka.clients.admin.LogDirDescription>>>> completionHandler)
brokers
- list of broker idscompletionHandler
- a Handler
completed with the operation resultFuture<Map<Integer,Map<String,org.apache.kafka.clients.admin.LogDirDescription>>> describeLogDirs(List<Integer> brokers)
describeLogDirs(List, Handler)
but returns a Future
of the asynchronous resultvoid deleteRecords(Map<TopicPartition,org.apache.kafka.clients.admin.RecordsToDelete> recordsToDelete, Handler<AsyncResult<Map<TopicPartition,org.apache.kafka.clients.admin.DeletedRecords>>> completionHandler)
recordsToDelete
- records to be delted on the given topic partitioncompletionHandler
- handler called on operation completedFuture<Map<TopicPartition,org.apache.kafka.clients.admin.DeletedRecords>> deleteRecords(Map<TopicPartition,org.apache.kafka.clients.admin.RecordsToDelete> recordsToDelete)
deleteRecords(Map, Handler)
but returns a Future
of the asynchronous resultvoid deleteConsumerGroups(List<String> groupIds, Handler<AsyncResult<Void>> completionHandler)
groupIds
- the ids of the groups to deletecompletionHandler
- handler called on operation completedFuture<Void> deleteConsumerGroups(List<String> groupIds)
deleteConsumerGroups(List, Handler)
but returns a Future
of the asynchronous resultvoid listConsumerGroupOffsets(String groupId, ListConsumerGroupOffsetsOptions options, Handler<AsyncResult<Map<TopicPartition,OffsetAndMetadata>>> completionHandler)
groupId
- The group id of the group whose offsets will be listedoptions
- The options to use when listing the consumer group offsets.completionHandler
- handler called on operation completed with the consumer groups offsetsFuture<Map<TopicPartition,OffsetAndMetadata>> listConsumerGroupOffsets(String groupId, ListConsumerGroupOffsetsOptions options)
listConsumerGroupOffsets(String, ListConsumerGroupOffsetsOptions, Handler)
but returns a Future
of the asynchronous resultdefault void listConsumerGroupOffsets(String groupId, Handler<AsyncResult<Map<TopicPartition,OffsetAndMetadata>>> completionHandler)
groupId
- The group id of the group whose offsets will be listedcompletionHandler
- handler called on operation completed with the consumer groups offsetsdefault Future<Map<TopicPartition,OffsetAndMetadata>> listConsumerGroupOffsets(String groupId)
listConsumerGroupOffsets(String, Handler)
but returns a Future
of the asynchronous resultvoid deleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions, Handler<AsyncResult<Void>> completionHandler)
groupId
- The group id of the group whose offsets will be deletedpartitions
- The set of partitions in the consumer group whose offsets will be deletedFuture<Void> deleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions)
deleteConsumerGroupOffsets(String, Set, Handler)
but returns a Future
of the asynchronous resultvoid alterConsumerGroupOffsets(String groupId, Map<TopicPartition,OffsetAndMetadata> offsets, Handler<AsyncResult<Void>> completionHandler)
groupId
- The group id of the group whose offsets will be alteredoffsets
- The map of offsets in the consumer group which will be alteredFuture<Void> alterConsumerGroupOffsets(String groupId, Map<TopicPartition,OffsetAndMetadata> offsets)
alterConsumerGroupOffsets(String, Map, Handler)
but returns a Future
of the asynchronous resultvoid listOffsets(Map<TopicPartition,OffsetSpec> topicPartitionOffsets, Handler<AsyncResult<Map<TopicPartition,ListOffsetsResultInfo>>> completionHandler)
topicPartitionOffsets
- The options to use when listing the partition offsets.completionHandler
- handler called on operation completed with the partition offsetsFuture<Map<TopicPartition,ListOffsetsResultInfo>> listOffsets(Map<TopicPartition,OffsetSpec> topicPartitionOffsets)
#listOffsets(Map, Handler)
but returns a Future
of the asynchronous resultvoid describeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter, Handler<AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
aclBindingFilter
- The filter to use.completionHandler
- handler called on operation completed with the ACL description result.Future<List<org.apache.kafka.common.acl.AclBinding>> describeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter)
describeAcls(AclBindingFilter, Handler)
but returns a Future
of the asynchronous resultvoid createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings, Handler<AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
aclBindings
- The ACL to create.completionHandler
- handler called on operation completed with the ACL creation result.Future<List<org.apache.kafka.common.acl.AclBinding>> createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings)
createAcls(List)
(ListFuture
of the asynchronous resultvoid deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings, Handler<AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
aclBindings
- The filter to delete matching ACLs.completionHandler
- handler called on operation completed with the ACL deletion result.Future<List<org.apache.kafka.common.acl.AclBinding>> deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings)
deleteAcls(List)
(ListFuture
of the asynchronous resultvoid close(Handler<AsyncResult<Void>> handler)
handler
- a Handler
completed with the operation resultFuture<Void> close()
close(Handler)
but returns a Future
of the asynchronous resultvoid close(long timeout, Handler<AsyncResult<Void>> handler)
timeout
- timeout to wait for closinghandler
- a Handler
completed with the operation resultFuture<Void> close(long timeout)
close(long, Handler)
but returns a Future
of the asynchronous resultCopyright © 2023 Eclipse. All rights reserved.