Interface KafkaAdminClient


public interface KafkaAdminClient
Vert.x Kafka Admin client implementation
  • Method Details

    • create

      static KafkaAdminClient create(io.vertx.core.Vertx vertx, org.apache.kafka.clients.admin.AdminClient adminClient)
      Create a new KafkaAdminClient instance
      Parameters:
      vertx - Vert.x instance to use
      adminClient - Kafka native Admin client instance
      Returns:
      an instance of the KafkaAdminClient
    • create

      static KafkaAdminClient create(io.vertx.core.Vertx vertx, Map<String,String> config)
      Create a new KafkaAdminClient instance
      Parameters:
      vertx - Vert.x instance to use
      config - Kafka admin client configuration
      Returns:
      an instance of the KafkaAdminClient
    • create

      static KafkaAdminClient create(io.vertx.core.Vertx vertx, Properties config)
      Create a new KafkaAdminClient instance
      Parameters:
      vertx - Vert.x instance to use
      config - Kafka admin client configuration
      Returns:
      an instance of the KafkaAdminClient
    • listTopics

      void listTopics(io.vertx.core.Handler<io.vertx.core.AsyncResult<Set<String>>> completionHandler)
      List the topics available in the cluster with the default options.
      Parameters:
      completionHandler - handler called on operation completed with the topics set
    • listTopics

      io.vertx.core.Future<Set<String>> listTopics()
      Like listTopics(Handler) but returns a Future of the asynchronous result
    • describeTopics

      void describeTopics(List<String> topicNames, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<String,TopicDescription>>> completionHandler)
      Describe some topics in the cluster, with the default options.
      Parameters:
      topicNames - the names of the topics to describe
      completionHandler - handler called on operation completed with the topics descriptions
    • describeTopics

      void describeTopics(List<String> topicNames, DescribeTopicsOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<String,TopicDescription>>> completionHandler)
      Like describeTopics(List, Handler) but allows for customised otions
    • describeTopics

      io.vertx.core.Future<Map<String,TopicDescription>> describeTopics(List<String> topicNames)
      Like describeTopics(List, Handler) but returns a Future of the asynchronous result
    • describeTopics

      io.vertx.core.Future<Map<String,TopicDescription>> describeTopics(List<String> topicNames, DescribeTopicsOptions options)
      Like describeTopics(List, DescribeTopicsOptions, Handler) but returns a Future of the asynchronous result
    • createTopics

      void createTopics(List<NewTopic> topics, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
      Creates a batch of new Kafka topics
      Parameters:
      topics - topics to create
      completionHandler - handler called on operation completed
    • createTopics

      io.vertx.core.Future<Void> createTopics(List<NewTopic> topics)
      Like createTopics(List, Handler) but returns a Future of the asynchronous result
    • deleteTopics

      void deleteTopics(List<String> topicNames, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
      Deletes a batch of Kafka topics
      Parameters:
      topicNames - the names of the topics to delete
      completionHandler - handler called on operation completed
    • deleteTopics

      io.vertx.core.Future<Void> deleteTopics(List<String> topicNames)
      Like deleteTopics(List, Handler) but returns a Future of the asynchronous result
    • createPartitions

      void createPartitions(Map<String,NewPartitions> partitions, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
      Creates a batch of new partitions in the Kafka topic
      Parameters:
      partitions - partitions to create
      completionHandler - handler called on operation completed
    • createPartitions

      io.vertx.core.Future<Void> createPartitions(Map<String,NewPartitions> partitions)
      Like createPartitions(Map, Handler) but returns a Future of the asynchronous result
      Parameters:
      partitions -
    • describeConfigs

      void describeConfigs(List<ConfigResource> configResources, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<ConfigResource,Config>>> completionHandler)
      Get the configuration for the specified resources with the default options
      Parameters:
      configResources - the resources (topic and broker resource types are currently supported)
      completionHandler - handler called on operation completed with the configurations
    • describeConfigs

      io.vertx.core.Future<Map<ConfigResource,Config>> describeConfigs(List<ConfigResource> configResources)
      Like describeConfigs(List, Handler) but returns a Future of the asynchronous result
    • alterConfigs

      void alterConfigs(Map<ConfigResource,Config> configs, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
      Update the configuration for the specified resources with the default options
      Parameters:
      configs - The resources with their configs (topic is the only resource type with configs that can be updated currently)
      completionHandler - handler called on operation completed
    • alterConfigs

      io.vertx.core.Future<Void> alterConfigs(Map<ConfigResource,Config> configs)
      Like alterConfigs(Map, Handler) but returns a Future of the asynchronous result
    • listConsumerGroups

      void listConsumerGroups(io.vertx.core.Handler<io.vertx.core.AsyncResult<List<ConsumerGroupListing>>> completionHandler)
      Get the the consumer groups available in the cluster with the default options
      Parameters:
      completionHandler - handler called on operation completed with the consumer groups ids
    • listConsumerGroups

      io.vertx.core.Future<List<ConsumerGroupListing>> listConsumerGroups()
      Like listConsumerGroups(Handler) but returns a Future of the asynchronous result
    • describeConsumerGroups

      void describeConsumerGroups(List<String> groupIds, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<String,ConsumerGroupDescription>>> completionHandler)
      Describe some group ids in the cluster, with the default options
      Parameters:
      groupIds - the ids of the groups to describe
      completionHandler - handler called on operation completed with the consumer groups descriptions
    • describeConsumerGroups

      io.vertx.core.Future<Map<String,ConsumerGroupDescription>> describeConsumerGroups(List<String> groupIds)
      Like describeConsumerGroups(List, Handler) but returns a Future of the asynchronous result
    • describeConsumerGroups

      void describeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<String,ConsumerGroupDescription>>> completionHandler)
      Like describeConsumerGroups(List, Handler) but allows customized options
    • describeConsumerGroups

      io.vertx.core.Future<Map<String,ConsumerGroupDescription>> describeConsumerGroups(List<String> groupIds, DescribeConsumerGroupsOptions options)
      Like describeConsumerGroups(List, DescribeConsumerGroupsOptions, Handler) but returns a Future of the asynchronous result
    • describeCluster

      void describeCluster(io.vertx.core.Handler<io.vertx.core.AsyncResult<ClusterDescription>> completionHandler)
      Describe the nodes in the cluster with the default options
      Parameters:
      completionHandler - handler called on operation completed with the cluster description
    • describeCluster

      io.vertx.core.Future<ClusterDescription> describeCluster()
      Like describeCluster(Handler) but returns a Future of the asynchronous result
    • describeCluster

      void describeCluster(DescribeClusterOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<ClusterDescription>> completionHandler)
      Like describeCluster(Handler) but allows customized options.
    • describeCluster

      io.vertx.core.Future<ClusterDescription> describeCluster(DescribeClusterOptions options)
      Like describeCluster(DescribeClusterOptions, Handler) but returns a Future of the asynchronous result
    • describeLogDirs

      void describeLogDirs(List<Integer> brokers, io.vertx.core.Handler<io.vertx.core.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
      Parameters:
      brokers - list of broker ids
      completionHandler - a Handler completed with the operation result
    • describeLogDirs

      io.vertx.core.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
    • deleteRecords

      void deleteRecords(Map<TopicPartition,org.apache.kafka.clients.admin.RecordsToDelete> recordsToDelete, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<TopicPartition,org.apache.kafka.clients.admin.DeletedRecords>>> completionHandler)
      Delete records from a topic partition.
      Parameters:
      recordsToDelete - records to be delted on the given topic partition
      completionHandler - handler called on operation completed
    • deleteRecords

      io.vertx.core.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
    • deleteConsumerGroups

      void deleteConsumerGroups(List<String> groupIds, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
      Delete consumer groups from the cluster.
      Parameters:
      groupIds - the ids of the groups to delete
      completionHandler - handler called on operation completed
    • deleteConsumerGroups

      io.vertx.core.Future<Void> deleteConsumerGroups(List<String> groupIds)
      Like deleteConsumerGroups(List, Handler) but returns a Future of the asynchronous result
    • listConsumerGroupOffsets

      void listConsumerGroupOffsets(String groupId, ListConsumerGroupOffsetsOptions options, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<TopicPartition,OffsetAndMetadata>>> completionHandler)
      List the consumer group offsets available in the cluster.
      Parameters:
      groupId - The group id of the group whose offsets will be listed
      options - The options to use when listing the consumer group offsets.
      completionHandler - handler called on operation completed with the consumer groups offsets
    • listConsumerGroupOffsets

      io.vertx.core.Future<Map<TopicPartition,OffsetAndMetadata>> listConsumerGroupOffsets(String groupId, ListConsumerGroupOffsetsOptions options)
      Like listConsumerGroupOffsets(String, ListConsumerGroupOffsetsOptions, Handler) but returns a Future of the asynchronous result
    • listConsumerGroupOffsets

      default void listConsumerGroupOffsets(String groupId, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<TopicPartition,OffsetAndMetadata>>> completionHandler)
      List the consumer group offsets available in the cluster.
      Parameters:
      groupId - The group id of the group whose offsets will be listed
      completionHandler - handler called on operation completed with the consumer groups offsets
    • listConsumerGroupOffsets

      default io.vertx.core.Future<Map<TopicPartition,OffsetAndMetadata>> listConsumerGroupOffsets(String groupId)
      Like listConsumerGroupOffsets(String, Handler) but returns a Future of the asynchronous result
    • deleteConsumerGroupOffsets

      void deleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
      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 deleted
      partitions - The set of partitions in the consumer group whose offsets will be deleted
    • deleteConsumerGroupOffsets

      io.vertx.core.Future<Void> deleteConsumerGroupOffsets(String groupId, Set<TopicPartition> partitions)
      Like deleteConsumerGroupOffsets(String, Set, Handler) but returns a Future of the asynchronous result
    • alterConsumerGroupOffsets

      void alterConsumerGroupOffsets(String groupId, Map<TopicPartition,OffsetAndMetadata> offsets, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> completionHandler)
      Alter committed offsets for a set of partitions in a consumer group.
      Parameters:
      groupId - The group id of the group whose offsets will be altered
      offsets - The map of offsets in the consumer group which will be altered
    • alterConsumerGroupOffsets

      io.vertx.core.Future<Void> alterConsumerGroupOffsets(String groupId, Map<TopicPartition,OffsetAndMetadata> offsets)
      Like alterConsumerGroupOffsets(String, Map, Handler) but returns a Future of the asynchronous result
    • listOffsets

      void listOffsets(Map<TopicPartition,OffsetSpec> topicPartitionOffsets, io.vertx.core.Handler<io.vertx.core.AsyncResult<Map<TopicPartition,ListOffsetsResultInfo>>> completionHandler)
      List the offsets available for a set of partitions.
      Parameters:
      topicPartitionOffsets - The options to use when listing the partition offsets.
      completionHandler - handler called on operation completed with the partition offsets
    • listOffsets

      io.vertx.core.Future<Map<TopicPartition,ListOffsetsResultInfo>> listOffsets(Map<TopicPartition,OffsetSpec> topicPartitionOffsets)
      Like
      invalid @link
      #listOffsets(Map<TopicPartition, OffsetSpec>, Handler)
      but returns a Future of the asynchronous result
    • describeAcls

      void describeAcls(org.apache.kafka.common.acl.AclBindingFilter aclBindingFilter, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
      Describe the ACL rules.
      Parameters:
      aclBindingFilter - The filter to use.
      completionHandler - handler called on operation completed with the ACL description result.
    • describeAcls

      io.vertx.core.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
    • createAcls

      void createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
      Create the ACL rules.
      Parameters:
      aclBindings - The ACL to create.
      completionHandler - handler called on operation completed with the ACL creation result.
    • createAcls

      io.vertx.core.Future<List<org.apache.kafka.common.acl.AclBinding>> createAcls(List<org.apache.kafka.common.acl.AclBinding> aclBindings)
      Like createAcls(List) (List, Handler)} but returns a Future of the asynchronous result
    • deleteAcls

      void deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings, io.vertx.core.Handler<io.vertx.core.AsyncResult<List<org.apache.kafka.common.acl.AclBinding>>> completionHandler)
      Delete the ACL rules.
      Parameters:
      aclBindings - The filter to delete matching ACLs.
      completionHandler - handler called on operation completed with the ACL deletion result.
    • deleteAcls

      io.vertx.core.Future<List<org.apache.kafka.common.acl.AclBinding>> deleteAcls(List<org.apache.kafka.common.acl.AclBindingFilter> aclBindings)
      Like deleteAcls(List) (List, Handler)} but returns a Future of the asynchronous result
    • close

      void close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Close the admin client
      Parameters:
      handler - a Handler completed with the operation result
    • close

      io.vertx.core.Future<Void> close()
      Like close(Handler) but returns a Future of the asynchronous result
    • close

      void close(long timeout, io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
      Close the admin client
      Parameters:
      timeout - timeout to wait for closing
      handler - a Handler completed with the operation result
    • close

      io.vertx.core.Future<Void> close(long timeout)
      Like close(long, Handler) but returns a Future of the asynchronous result