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<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<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<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<ClusterDescription> |
describeCluster()
Like
describeCluster(Handler) but returns a Future of the asynchronous result |
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 |
void |
describeConsumerGroups(List<String> groupIds,
Handler<AsyncResult<Map<String,ConsumerGroupDescription>>> completionHandler)
Describe some group ids in the cluster, with the default options
|
Future<Map<String,TopicDescription>> |
describeTopics(List<String> topicNames)
Like
describeTopics(List, Handler) but returns a Future of the asynchronous result |
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 descriptionsFuture<Map<String,TopicDescription>> describeTopics(List<String> topicNames)
describeTopics(List, 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 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 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 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 © 2021 Eclipse. All rights reserved.