Package io.vertx.rxjava3.kafka.admin
Class KafkaAdminClient
- java.lang.Object
-
- io.vertx.rxjava3.kafka.admin.KafkaAdminClient
-
-
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<KafkaAdminClient>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description KafkaAdminClient(KafkaAdminClient delegate)KafkaAdminClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Completableclose()Close the admin clientCompletableclose(long timeout)Close the admin clientstatic KafkaAdminClientcreate(Vertx vertx, Map<String,String> config)Create a new KafkaAdminClient instanceSingle<List<org.apache.kafka.common.acl.AclBinding>>createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings)Create the ACL rules.CompletablecreatePartitions(Map<String,NewPartitions> partitions)Creates a batch of new partitions in the Kafka topicCompletablecreateTopics(List<NewTopic> topics)Creates a batch of new Kafka topicsSingle<List<org.apache.kafka.common.acl.AclBinding>>deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings)Delete the ACL rules.CompletabledeleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions)Delete committed offsets for a set of partitions in a consumer group.CompletabledeleteConsumerGroups(List<String> groupIds)Delete consumer groups from the cluster.CompletabledeleteTopics(List<String> topicNames)Deletes a batch of Kafka topicsSingle<List<org.apache.kafka.common.acl.AclBinding>>describeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter)Describe the ACL rules.Single<ClusterDescription>describeCluster()Describe the nodes in the cluster with the default optionsSingle<ClusterDescription>describeCluster(DescribeClusterOptions options)LikedescribeCluster()but allows customized options.Single<Map<String,ConsumerGroupDescription>>describeConsumerGroups(List<String> groupIds)Describe some group ids in the cluster, with the default optionsSingle<Map<String,ConsumerGroupDescription>>describeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options)LikedescribeConsumerGroups(java.util.List<java.lang.String>)but allows customized optionsSingle<Map<String,TopicDescription>>describeTopics(List<String> topicNames)Describe some topics in the cluster, with the default options.Single<Map<String,TopicDescription>>describeTopics(List<String> topicNames, DescribeTopicsOptions options)LikedescribeTopics(java.util.List<java.lang.String>)but allows for customised otionsbooleanequals(Object o)KafkaAdminClientgetDelegate()inthashCode()Single<List<ConsumerGroupListing>>listConsumerGroups()Get the the consumer groups available in the cluster with the default optionsSingle<Set<String>>listTopics()List the topics available in the cluster with the default options.static KafkaAdminClientnewInstance(KafkaAdminClient arg)CompletablerxClose()Close the admin clientCompletablerxClose(long timeout)Close the admin clientSingle<List<org.apache.kafka.common.acl.AclBinding>>rxCreateAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings)Create the ACL rules.CompletablerxCreatePartitions(Map<String,NewPartitions> partitions)Creates a batch of new partitions in the Kafka topicCompletablerxCreateTopics(List<NewTopic> topics)Creates a batch of new Kafka topicsSingle<List<org.apache.kafka.common.acl.AclBinding>>rxDeleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings)Delete the ACL rules.CompletablerxDeleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions)Delete committed offsets for a set of partitions in a consumer group.CompletablerxDeleteConsumerGroups(List<String> groupIds)Delete consumer groups from the cluster.CompletablerxDeleteTopics(List<String> topicNames)Deletes a batch of Kafka topicsSingle<List<org.apache.kafka.common.acl.AclBinding>>rxDescribeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter)Describe the ACL rules.Single<ClusterDescription>rxDescribeCluster()Describe the nodes in the cluster with the default optionsSingle<ClusterDescription>rxDescribeCluster(DescribeClusterOptions options)LikedescribeCluster()but allows customized options.Single<Map<String,ConsumerGroupDescription>>rxDescribeConsumerGroups(List<String> groupIds)Describe some group ids in the cluster, with the default optionsSingle<Map<String,ConsumerGroupDescription>>rxDescribeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options)LikedescribeConsumerGroups(java.util.List<java.lang.String>)but allows customized optionsSingle<Map<String,TopicDescription>>rxDescribeTopics(List<String> topicNames)Describe some topics in the cluster, with the default options.Single<Map<String,TopicDescription>>rxDescribeTopics(List<String> topicNames, DescribeTopicsOptions options)LikedescribeTopics(java.util.List<java.lang.String>)but allows for customised otionsSingle<List<ConsumerGroupListing>>rxListConsumerGroups()Get the the consumer groups available in the cluster with the default optionsSingle<Set<String>>rxListTopics()List the topics available in the cluster with the default options.StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<KafkaAdminClient> __TYPE_ARG
-
-
Constructor Detail
-
KafkaAdminClient
public KafkaAdminClient(KafkaAdminClient delegate)
-
KafkaAdminClient
public KafkaAdminClient(Object delegate)
-
-
Method Detail
-
getDelegate
public KafkaAdminClient getDelegate()
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
create
public static KafkaAdminClient create(Vertx vertx, Map<String,String> config)
Create a new KafkaAdminClient instance- Parameters:
vertx- Vert.x instance to useconfig- Kafka admin client configuration- Returns:
- an instance of the KafkaAdminClient
-
listTopics
public Single<Set<String>> listTopics()
List the topics available in the cluster with the default options.- Returns:
- a future notified with the result
-
rxListTopics
public Single<Set<String>> rxListTopics()
List the topics available in the cluster with the default options.- Returns:
- a future notified with the result
-
describeTopics
public Single<Map<String,TopicDescription>> describeTopics(List<String> topicNames)
Describe some topics in the cluster, with the default options.- Parameters:
topicNames- the names of the topics to describe- Returns:
- a future notified with the result
-
rxDescribeTopics
public Single<Map<String,TopicDescription>> rxDescribeTopics(List<String> topicNames)
Describe some topics in the cluster, with the default options.- Parameters:
topicNames- the names of the topics to describe- Returns:
- a future notified with the result
-
describeTopics
public Single<Map<String,TopicDescription>> describeTopics(List<String> topicNames, DescribeTopicsOptions options)
LikedescribeTopics(java.util.List<java.lang.String>)but allows for customised otions- Parameters:
topicNames-options-- Returns:
-
rxDescribeTopics
public Single<Map<String,TopicDescription>> rxDescribeTopics(List<String> topicNames, DescribeTopicsOptions options)
LikedescribeTopics(java.util.List<java.lang.String>)but allows for customised otions- Parameters:
topicNames-options-- Returns:
-
createTopics
public Completable createTopics(List<NewTopic> topics)
Creates a batch of new Kafka topics- Parameters:
topics- topics to create- Returns:
- a future notified with the result
-
rxCreateTopics
public Completable rxCreateTopics(List<NewTopic> topics)
Creates a batch of new Kafka topics- Parameters:
topics- topics to create- Returns:
- a future notified with the result
-
deleteTopics
public Completable deleteTopics(List<String> topicNames)
Deletes a batch of Kafka topics- Parameters:
topicNames- the names of the topics to delete- Returns:
- a future notified with the result
-
rxDeleteTopics
public Completable rxDeleteTopics(List<String> topicNames)
Deletes a batch of Kafka topics- Parameters:
topicNames- the names of the topics to delete- Returns:
- a future notified with the result
-
createPartitions
public Completable createPartitions(Map<String,NewPartitions> partitions)
Creates a batch of new partitions in the Kafka topic- Parameters:
partitions- partitions to create- Returns:
- a future notified with the result
-
rxCreatePartitions
public Completable rxCreatePartitions(Map<String,NewPartitions> partitions)
Creates a batch of new partitions in the Kafka topic- Parameters:
partitions- partitions to create- Returns:
- a future notified with the result
-
listConsumerGroups
public Single<List<ConsumerGroupListing>> listConsumerGroups()
Get the the consumer groups available in the cluster with the default options- Returns:
- a future notified with the result
-
rxListConsumerGroups
public Single<List<ConsumerGroupListing>> rxListConsumerGroups()
Get the the consumer groups available in the cluster with the default options- Returns:
- a future notified with the result
-
describeConsumerGroups
public Single<Map<String,ConsumerGroupDescription>> describeConsumerGroups(List<String> groupIds)
Describe some group ids in the cluster, with the default options- Parameters:
groupIds- the ids of the groups to describe- Returns:
- a future notified with the result
-
rxDescribeConsumerGroups
public Single<Map<String,ConsumerGroupDescription>> rxDescribeConsumerGroups(List<String> groupIds)
Describe some group ids in the cluster, with the default options- Parameters:
groupIds- the ids of the groups to describe- Returns:
- a future notified with the result
-
describeConsumerGroups
public Single<Map<String,ConsumerGroupDescription>> describeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options)
LikedescribeConsumerGroups(java.util.List<java.lang.String>)but allows customized options- Parameters:
groupIds-options-- Returns:
-
rxDescribeConsumerGroups
public Single<Map<String,ConsumerGroupDescription>> rxDescribeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options)
LikedescribeConsumerGroups(java.util.List<java.lang.String>)but allows customized options- Parameters:
groupIds-options-- Returns:
-
describeCluster
public Single<ClusterDescription> describeCluster()
Describe the nodes in the cluster with the default options- Returns:
- a future notified with the result
-
rxDescribeCluster
public Single<ClusterDescription> rxDescribeCluster()
Describe the nodes in the cluster with the default options- Returns:
- a future notified with the result
-
describeCluster
public Single<ClusterDescription> describeCluster(DescribeClusterOptions options)
LikedescribeCluster()but allows customized options.- Parameters:
options-- Returns:
-
rxDescribeCluster
public Single<ClusterDescription> rxDescribeCluster(DescribeClusterOptions options)
LikedescribeCluster()but allows customized options.- Parameters:
options-- Returns:
-
deleteConsumerGroups
public Completable deleteConsumerGroups(List<String> groupIds)
Delete consumer groups from the cluster.- Parameters:
groupIds- the ids of the groups to delete- Returns:
- a future notified with the result
-
rxDeleteConsumerGroups
public Completable rxDeleteConsumerGroups(List<String> groupIds)
Delete consumer groups from the cluster.- Parameters:
groupIds- the ids of the groups to delete- Returns:
- a future notified with the result
-
deleteConsumerGroupOffsets
public Completable deleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions)
Delete committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.- Parameters:
groupId- The group id of the group whose offsets will be deletedpartitions-- Returns:
- a future notified with the result
-
rxDeleteConsumerGroupOffsets
public Completable rxDeleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions)
Delete committed offsets for a set of partitions in a consumer group. This will succeed at the partition level only if the group is not actively subscribed to the corresponding topic.- Parameters:
groupId- The group id of the group whose offsets will be deletedpartitions-- Returns:
- a future notified with the result
-
close
public Completable close()
Close the admin client- Returns:
- a future notified with the result
-
rxClose
public Completable rxClose()
Close the admin client- Returns:
- a future notified with the result
-
close
public Completable close(long timeout)
Close the admin client- Parameters:
timeout- timeout to wait for closing- Returns:
- a future notified with the result
-
rxClose
public Completable rxClose(long timeout)
Close the admin client- Parameters:
timeout- timeout to wait for closing- Returns:
- a future notified with the result
-
describeAcls
public Single<List<org.apache.kafka.common.acl.AclBinding>> describeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter)
Describe the ACL rules.- Parameters:
aclBindingFilter- The filter to use.- Returns:
- a future notified with the result
-
rxDescribeAcls
public Single<List<org.apache.kafka.common.acl.AclBinding>> rxDescribeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter)
Describe the ACL rules.- Parameters:
aclBindingFilter- The filter to use.- Returns:
- a future notified with the result
-
createAcls
public Single<List<org.apache.kafka.common.acl.AclBinding>> createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings)
Create the ACL rules.- Parameters:
aclBindings- The ACL to create.- Returns:
- a future notified with the result
-
rxCreateAcls
public Single<List<org.apache.kafka.common.acl.AclBinding>> rxCreateAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings)
Create the ACL rules.- Parameters:
aclBindings- The ACL to create.- Returns:
- a future notified with the result
-
deleteAcls
public Single<List<org.apache.kafka.common.acl.AclBinding>> deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings)
Delete the ACL rules.- Parameters:
aclBindings- The filter to delete matching ACLs.- Returns:
- a future notified with the result
-
rxDeleteAcls
public Single<List<org.apache.kafka.common.acl.AclBinding>> rxDeleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings)
Delete the ACL rules.- Parameters:
aclBindings- The filter to delete matching ACLs.- Returns:
- a future notified with the result
-
newInstance
public static KafkaAdminClient newInstance(KafkaAdminClient arg)
-
-