### start(AuthorizerServerInfo) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/server/authorizer/Authorizer.html Starts loading authorization metadata and returns futures that can be used to wait until metadata for authorizing requests on each listener is available. Each listener will be started only after its metadata is available and the authorizer is ready to start authorizing requests on that listener. ```APIDOC ## start(AuthorizerServerInfo) ### Description Starts loading authorization metadata and returns futures that can be used to wait until metadata for authorizing requests on each listener is available. Each listener will be started only after its metadata is available and the authorizer is ready to start authorizing requests on that listener. ### Method start ### Signature Map> start(AuthorizerServerInfo serverInfo) ### Parameters - **serverInfo** (AuthorizerServerInfo) - Required - Metadata for the broker including broker id and listener endpoints ### Returns Map> - Futures that complete when the authorizer is ready to authorize requests on each listener. ``` -------------------------------- ### startOffset() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/SharePartitionOffsetInfo.html Returns the start offset for the share-partition. ```APIDOC ## startOffset() ### Description Get the start offset for the share-partition. The start offset is the earliest offset for in-flight records being evaluated for delivery to share consumers. Some records after the start offset may already have completed delivery. ### Method Signature `public long startOffset()` ### Returns - **long** - The start offset of the partition read by the share group. ``` -------------------------------- ### get(String name) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Config.html Gets the configuration entry with the provided name or null if there isn't one. ```APIDOC ## get(String name) ### Description Gets the configuration entry with the provided name or null if there isn't one. ### Method `public ConfigEntry get(String name)` ### Parameters - `name` (String) - Required - The name of the configuration entry to retrieve. ### Returns - `ConfigEntry` - The configuration entry with the provided name, or null if not found. ``` -------------------------------- ### MetricName Usage Example Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/MetricName.html Demonstrates how to set up metrics, define a sensor, create MetricName instances, and record values. ```java // set up metrics: Map metricTags = new LinkedHashMap(); metricTags.put("client-id", "producer-1"); metricTags.put("topic", "topic"); MetricConfig metricConfig = new MetricConfig().tags(metricTags); Metrics metrics = new Metrics(metricConfig); // this is the global repository of metrics and sensors Sensor sensor = metrics.sensor("message-sizes"); MetricName metricName = metrics.metricName("message-size-avg", "producer-metrics", "average message size"); sensor.add(metricName, new Avg()); metricName = metrics.metricName("message-size-max", "producer-metrics"); sensor.add(metricName, new Max()); metricName = metrics.metricName("message-size-min", "producer-metrics", "message minimum size", "client-id", "my-client", "topic", "my-topic"); sensor.add(metricName, new Min()); // as messages are sent we record the sizes sensor.record(messageSize); ``` -------------------------------- ### earlyStartListeners() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/server/authorizer/AuthorizerServerInfo.html Returns the configured early start listeners. ```APIDOC ## earlyStartListeners() ### Description Returns the configured early start listeners. ### Method earlyStartListeners() ### Return Type Collection ### Returns The configured early start listeners. ``` -------------------------------- ### Callback ordering guarantee example Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/KafkaProducer.html Shows two sends to the same partition with callbacks, illustrating that callback1 is guaranteed to execute before callback2. ```java producer.send(new ProducerRecord(topic, partition, key1, value1), callback1); producer.send(new ProducerRecord(topic, partition, key2, value2), callback2); ``` -------------------------------- ### get(String path) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/config/provider/ConfigProvider.html Retrieves the configuration data at the given path. ```APIDOC ## get(String path) ### Description Retrieves the data at the given path. ### Method ConfigData get(String path) ### Parameters - **path** (String) - Required - The path where the data resides. ### Returns - **ConfigData** - The configuration data. ``` -------------------------------- ### static void main(String[] args) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/ProducerConfig.html Generates HTML documentation for producer configurations. ```APIDOC ## Method: static void main(String[] args) ### Description Generates HTML documentation for producer configurations. ### Parameters - **args** (String[]) - Required - Command-line arguments. ### Example ```java ProducerConfig.main(new String[]{}); ``` ``` -------------------------------- ### get(String path, Set keys) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/config/provider/ConfigProvider.html Retrieves the configuration data with the given keys at the given path. ```APIDOC ## get(String path, Set keys) ### Description Retrieves the data with the given keys at the given path. ### Method ConfigData get(String path, Set keys) ### Parameters - **path** (String) - Required - The path where the data resides. - **keys** (Set) - Required - The keys whose values will be retrieved. ### Returns - **ConfigData** - The configuration data. ``` -------------------------------- ### main(String[] args) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/ProducerConfig.html Generates HTML documentation for producer configurations. ```APIDOC ## main(String[] args) ### Description Generates HTML documentation for producer configurations. ### Method Static method ### Parameters - **args** (String[]) - Required - Command line arguments (unused) ``` -------------------------------- ### void seekToBeginning(Collection partitions) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/MockConsumer.html Seeks to the beginning of the given partitions. ```APIDOC ## void seekToBeginning(Collection partitions) ### Description Seeks to the beginning of the given partitions. ### Method seekToBeginning ### Parameters - **partitions** (Collection) - Required - The partitions to seek. ``` -------------------------------- ### get() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/security/oauthbearer/BrokerJwtValidator.ClaimSupplier.html The get() method is the sole method of the ClaimSupplier interface. It returns a value of type T and may throw a MalformedClaimException. ```APIDOC ## get() ### Description Returns a value of type T. This method is part of the ClaimSupplier interface. ### Method get() ### Signature T get() throws org.jose4j.jwt.MalformedClaimException ### Parameters None ### Return Type T ### Throws - org.jose4j.jwt.MalformedClaimException ``` -------------------------------- ### JAAS configuration example for Kafka client Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/security/oauthbearer/JwtBearerJwtRetriever.html Example JAAS configuration for a Kafka client using JwtBearerJwtRetriever, including all required sasl.oauthbearer.* properties. ```properties sasl.jaas.config=org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required ; sasl.oauthbearer.assertion.algorithm=RS256 sasl.oauthbearer.assertion.claim.aud=my-application-audience sasl.oauthbearer.assertion.claim.exp.seconds=600 sasl.oauthbearer.assertion.claim.iss=my-oauth-issuer sasl.oauthbearer.assertion.claim.jti.include=true sasl.oauthbearer.assertion.claim.nbf.seconds=120 sasl.oauthbearer.assertion.claim.sub=kafka-app-1234 sasl.oauthbearer.assertion.private.key.file=/path/to/private.key sasl.oauthbearer.assertion.private.key.passphrase=$3cr3+ sasl.oauthbearer.assertion.template.file=/path/to/assertion-template.json sasl.oauthbearer.jwt.retriever.class=org.apache.kafka.common.security.oauthbearer.JwtBearerJwtRetriever sasl.oauthbearer.scope=my-application-scope sasl.oauthbearer.token.endpoint.url=https://example.com/oauth2/v1/token ``` -------------------------------- ### main(String[] args) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/AdminClientConfig.html Provides a command-line entry point for the AdminClientConfig class. ```APIDOC ## main(String[] args) ### Description Static main method that can be used to run the AdminClientConfig class from the command line. ### Method static void main(String[] args) ### Parameters - **args** (String[]) - Required - Command-line arguments. ``` -------------------------------- ### Simple blocking send with get() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/KafkaProducer.html Shows a simple blocking send by immediately calling get() on the returned Future. The record is sent to 'my-topic' with a key and value as byte arrays. ```java byte[] key = "key".getBytes(); byte[] value = "value".getBytes(); ProducerRecord record = new ProducerRecord("my-topic", key, value) producer.send(record).get(); ``` -------------------------------- ### get(String path) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/config/provider/FileConfigProvider.html Retrieves the data at the given Properties file. This method is specified by the ConfigProvider interface. ```APIDOC ## get(String path) ### Description Retrieves the data at the given Properties file. This method is specified by the ConfigProvider interface. ### Method get ### Signature public ConfigData get(String path) ### Parameters - **path** (String) - Required - The file where the data resides. ### Returns ConfigData - the configuration data ``` -------------------------------- ### describeConfigs(Collection resources, DescribeConfigsOptions options) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Gets the configuration for the specified resources with specified options. ```APIDOC ## describeConfigs(Collection resources, DescribeConfigsOptions options) ### Description Get the configuration for the specified resources. ### Method GET ### Parameters - **resources** (Collection) - Required - The resources whose configuration is to be described. - **options** (DescribeConfigsOptions) - Required - The options to use for this operation. ### Returns DescribeConfigsResult ``` -------------------------------- ### Cluster.clusterResource() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the ClusterResource for this cluster. ```APIDOC ## Cluster.clusterResource() ### Description Gets the ClusterResource for this cluster. ### Method Instance Method ### Signature public ClusterResource clusterResource() ### Returns The ClusterResource. ``` -------------------------------- ### beginningOffsets(Collection partitions) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Get the first offset for the given partitions. ```APIDOC ## beginningOffsets(Collection partitions) ### Description Get the first offset for the given partitions. ### Method beginningOffsets ### Parameters - **partitions** (Collection) - Required - The partitions to get the beginning offsets for. ### Returns Map - A map from partition to the first offset. ``` -------------------------------- ### Metrics usage example Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/metrics/Metrics.html Shows how to create a Metrics instance, define a sensor, add metrics for average and maximum, and record a message size. ```java // set up metrics: Metrics metrics = new Metrics(); // this is the global repository of metrics and sensors Sensor sensor = metrics.sensor("message-sizes"); MetricName metricName = metrics.metricName("message-size-avg", "producer-metrics"); sensor.add(metricName, new Avg()); metricName = metrics.metricName("message-size-max", "producer-metrics"); sensor.add(metricName, new Max()); // as messages are sent we record the sizes sensor.record(messageSize); ``` -------------------------------- ### Cluster.topics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets all topics in the cluster. ```APIDOC ## Cluster.topics() ### Description Gets all topics in the cluster. ### Method Instance Method ### Signature public Set topics() ### Returns A set of all topics. ``` -------------------------------- ### Subscribing with a Custom RebalanceListener Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/StickyAssignor.html Example of how to register the optimized listener with a Kafka consumer. ```java consumer.subscribe(topics, new TheNewRebalanceListener()); ``` -------------------------------- ### subscription() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Get the current subscription. ```APIDOC ## subscription() ### Description Get the current subscription. ### Method subscription ### Returns Set - The set of topics currently subscribed to. ### See Also - KafkaConsumer.subscription() ``` -------------------------------- ### Define and parse configurations with ConfigDef Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/config/ConfigDef.html Shows how to create a ConfigDef, define configurations with defaults, validators, and dependents, then parse a properties map and validate the full configuration. The example uses Type.STRING, Type.INT, Range.atLeast(0), and Importance levels. It demonstrates retrieving parsed values and validating with ConfigValue. ```java ConfigDef defs = new ConfigDef(); // check define(String, Type, Object, Importance, String) for more details. defs.define("config_with_default", Type.STRING, "default string value", Importance.High, "Configuration with default value."); // check define(String, Type, Object, Validator, Importance, String) for more details. defs.define("config_with_validator", Type.INT, 42, Range.atLeast(0), Importance.High, "Configuration with user provided validator."); // check define(String, Type, Importance, String, String, int, Width, String, List) for more details. defs.define("config_with_dependents", Type.INT, Importance.LOW, "Configuration with dependents.", "group", 1, Width.SHORT, "Config With Dependents", Arrays.asList("config_with_default","config_with_validator")); Map props = new HashMap<>(); props.put("config_with_default", "some value"); props.put("config_with_dependents", "some other value"); Map configs = defs.parse(props); // will return "some value" String someConfig = (String) configs.get("config_with_default"); // will return default value of 42 int anotherConfig = (Integer) configs.get("config_with_validator"); // To validate the full configuration, use: List configValues = defs.validate(props); // The ConfigValue contains updated configuration information given the current configuration values. ``` -------------------------------- ### metrics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Get the metrics of this consumer. ```APIDOC ## metrics() ### Description Get the metrics of this consumer. ### Method metrics ### Returns Map - A map of metric names to metric instances. ``` -------------------------------- ### Create a topic with Admin client Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Shows how to instantiate an Admin client and create a new topic with a compacted cleanup policy. Uses Admin.create(Properties) and CreateTopicsResult to handle the asynchronous operation, blocking with KafkaFuture.get(). ```java Properties props = new Properties(); props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); try (Admin admin = Admin.create(props)) { String topicName = "my-topic"; int partitions = 12; short replicationFactor = 3; // Create a compacted topic CreateTopicsResult result = admin.createTopics(Collections.singleton( new NewTopic(topicName, partitions, replicationFactor) .configs(Collections.singletonMap(TopicConfig.CLEANUP_POLICY_CONFIG, TopicConfig.CLEANUP_POLICY_COMPACT)))); // Call values() to get the result for a specific topic KafkaFuture future = result.values().get(topicName); // Call get() to block until the topic creation is complete or has failed // if creation failed the ExecutionException wraps the underlying cause. future.get(); } ``` -------------------------------- ### createServerSslEngine(String peerHost, int peerPort) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/security/auth/SslEngineFactory.html Creates a new SSLEngine object to be used by the server. The peer host and port are hints and not used for validation. ```APIDOC ## createServerSslEngine(String peerHost, int peerPort) ### Description Creates a new SSLEngine object to be used by the server. ### Method createServerSslEngine ### Parameters - **peerHost** (String) - The peer host to use. This is a hint and not used for validation. - **peerPort** (int) - The peer port to use. This is a hint and not used for validation. ### Returns - **SSLEngine** - The new SSLEngine. ``` -------------------------------- ### documentation() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/ConfigEntry.html Returns the config documentation. ```APIDOC ## documentation() ### Description Returns the config documentation. ### Return Type - String ``` -------------------------------- ### Cluster.topicIds() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the collection of topic IDs. ```APIDOC ## Cluster.topicIds() ### Description Gets the collection of topic IDs. ### Method Instance Method ### Signature public Collection topicIds() ### Returns The collection of topic IDs. ``` -------------------------------- ### Cluster.controller() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the controller node of the cluster. ```APIDOC ## Cluster.controller() ### Description Gets the controller node of the cluster. ### Method Instance Method ### Signature public Node controller() ### Returns The controller node. ``` -------------------------------- ### seekToBeginning(Collection partitions) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Move the consumer's offset for the given partitions to the beginning. ```APIDOC ## seekToBeginning(Collection partitions) ### Description Move the consumer's offset for the given partitions to the beginning. ### Method seekToBeginning ### Parameters - **partitions** (Collection) - Required - The partitions to seek to the beginning. ``` -------------------------------- ### Cluster.internalTopics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the set of internal topics. ```APIDOC ## Cluster.internalTopics() ### Description Gets the set of internal topics. ### Method Instance Method ### Signature public Set internalTopics() ### Returns The set of internal topics. ``` -------------------------------- ### create Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Creates a new Admin with the given configuration. ```APIDOC ## create ### Description Create a new Admin with the given configuration. ### Method create ### Signature `create(Map conf)` ### Parameters - **conf** (Map) - Required - The configuration map. ### Returns - **Admin** - The new Admin instance. --- ### Description Create a new Admin with the given configuration. ### Method create ### Signature `create(Properties props)` ### Parameters - **props** (Properties) - Required - The configuration properties. ### Returns - **Admin** - The new Admin instance. ``` -------------------------------- ### Cluster.invalidTopics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the set of invalid topics. ```APIDOC ## Cluster.invalidTopics() ### Description Gets the set of invalid topics. ### Method Instance Method ### Signature public Set invalidTopics() ### Returns The set of invalid topics. ``` -------------------------------- ### resume(Collection partitions) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Resume fetching from the given partitions. ```APIDOC ## resume(Collection partitions) ### Description Resume fetching from the given partitions. ### Method resume ### Parameters - **partitions** (Collection) - Required - The partitions to resume. ``` -------------------------------- ### Cluster.unauthorizedTopics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the set of unauthorized topics. ```APIDOC ## Cluster.unauthorizedTopics() ### Description Gets the set of unauthorized topics. ### Method Instance Method ### Signature public Set unauthorizedTopics() ### Returns The set of unauthorized topics. ``` -------------------------------- ### get(String path) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/config/provider/EnvVarConfigProvider.html Retrieves the data at the given path. For this provider, the path is unused and the method returns environment variables as configuration. ```APIDOC ## get(String path) ### Description Retrieves the data at the given path. For this provider, the path is unused and the method returns environment variables as configuration. ### Method get ### Signature public ConfigData get(String path) ### Parameters - **path** (String) - Required - Unused; path is not used for environment variables. ### Returns - **ConfigData** - Returns environment variables as configuration. ``` -------------------------------- ### Admin.create(Properties) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Creates an Admin client instance using the provided configuration properties. This is the entry point for using the Admin interface. ```APIDOC ## Admin.create(Properties) ### Description Creates an Admin client instance using the provided configuration properties. This is the entry point for using the Admin interface. ### Method create ### Parameters - **props** (Properties) - Required - Configuration properties including bootstrap.servers. ### Request Example ```java Properties props = new Properties(); props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092"); Admin admin = Admin.create(props); ``` ### Response Returns an Admin instance that is thread-safe and can be used to perform administrative operations. ``` -------------------------------- ### groupMetadata() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Get the metadata of the consumer group. ```APIDOC ## groupMetadata() ### Description Get the metadata of the consumer group. ### Method groupMetadata ### Returns ConsumerGroupMetadata - The consumer group metadata. ``` -------------------------------- ### metrics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Gets the metrics kept by the adminClient. ```APIDOC ## metrics() ### Description Gets the metrics kept by the adminClient. ### Method Map metrics() ### Returns Map of metric names to metrics. ``` -------------------------------- ### seekToBeginning(Collection partitions) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Seeks to the beginning of the given partitions. This method is part of the KafkaConsumer API. ```APIDOC ## seekToBeginning(Collection partitions) ### Description Seeks to the beginning of the given partitions. ### Method seekToBeginning ### Parameters - **partitions** (Collection) - Required - The partitions to seek to the beginning. ### See Also - `KafkaConsumer.seekToBeginning(Collection)` ``` -------------------------------- ### DescribeMetadataQuorumOptions() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/DescribeMetadataQuorumOptions.html Constructs a new DescribeMetadataQuorumOptions instance. This is the default constructor for creating options to be passed to Admin.describeMetadataQuorum. ```APIDOC ## DescribeMetadataQuorumOptions() ### Description Constructs a new DescribeMetadataQuorumOptions instance. This is the default constructor for creating options to be passed to Admin.describeMetadataQuorum. ### Method Constructor ### Signature public DescribeMetadataQuorumOptions() ### Parameters None ### Returns A new DescribeMetadataQuorumOptions instance. ### Usage Example DescribeMetadataQuorumOptions options = new DescribeMetadataQuorumOptions(); ``` -------------------------------- ### Cluster.partition(TopicPartition) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the metadata for the specified partition. ```APIDOC ## Cluster.partition(TopicPartition) ### Description Gets the metadata for the specified partition. ### Method Instance Method ### Signature public PartitionInfo partition(TopicPartition topicPartition) ### Parameters - **topicPartition** (TopicPartition) - The topic and partition to fetch info for. ### Returns The metadata about the given topic and partition, or null if none is found. ``` -------------------------------- ### initialize(Subject, CallbackHandler, Map, Map) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/security/plain/PlainLoginModule.html Initializes the login module with the subject, callback handler, shared state, and options. ```APIDOC ## initialize(Subject, CallbackHandler, Map, Map) ### Description Initializes the PlainLoginModule with the provided subject, callback handler, shared state, and options. This method is called by the authentication framework to set up the login module. ### Method public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options) ### Parameters - **subject** (Subject) - Required - The subject to be authenticated. - **callbackHandler** (CallbackHandler) - Required - The callback handler for user interaction. - **sharedState** (Map) - Required - Shared state map. - **options** (Map) - Required - Options map. ``` -------------------------------- ### beginningOffsets(Collection partitions, Duration timeout) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Get the first offset for the given partitions, waiting up to the specified timeout. ```APIDOC ## beginningOffsets(Collection partitions, Duration timeout) ### Description Get the first offset for the given partitions, waiting up to the specified timeout. ### Method beginningOffsets ### Parameters - **partitions** (Collection) - Required - The partitions to get the beginning offsets for. - **timeout** (Duration) - Required - The maximum time to wait for the operation to complete. ### Returns Map - A map from partition to the first offset. ``` -------------------------------- ### TopicPartitionInfo(int partition, Node leader, List replicas, List isr, List elr, List lastKnownElr) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/TopicPartitionInfo.html Creates an instance of TopicPartitionInfo with the provided parameters including eligible leader replicas and last known eligible leader replicas. ```APIDOC ## Constructor: TopicPartitionInfo(int partition, Node leader, List replicas, List isr, List elr, List lastKnownElr) ### Description Creates an instance of this class with the provided parameters. ### Parameters - **partition** (int) - Required - The partition id. - **leader** (Node) - Required - The leader of the partition or null if there is none. - **replicas** (List) - Required - The replicas of the partition in the same order as the replica assignment (the preferred replica is the head of the list). - **isr** (List) - Required - The in-sync replicas. - **elr** (List) - Required - The eligible leader replicas. - **lastKnownElr** (List) - Required - The last known eligible leader replicas. ``` -------------------------------- ### configDef() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/ProducerConfig.html Gets a copy of the producer configuration definition. ```APIDOC ## configDef() ### Description Gets a copy of the producer configuration definition. ### Method Static method ### Returns ConfigDef - A new ConfigDef instance containing the producer configuration definition ``` -------------------------------- ### configNames() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/ProducerConfig.html Gets the set of all producer configuration names. ```APIDOC ## configNames() ### Description Gets the set of all producer configuration names. ### Method Static method ### Returns Set - The set of configuration names ``` -------------------------------- ### DescribeProducersOptions() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/DescribeProducersOptions.html Constructs a new DescribeProducersOptions instance with default settings. ```APIDOC ## DescribeProducersOptions() ### Description Constructs a new DescribeProducersOptions instance with default settings. ### Constructor `DescribeProducersOptions()` ### Parameters None. ### Returns A new DescribeProducersOptions instance. ``` -------------------------------- ### ConfigEntry(String name, String value, ConfigEntry.ConfigSource source, boolean isSensitive, boolean isReadOnly, List synonyms, ConfigEntry.ConfigType type, String documentation) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/ConfigEntry.html Creates a configuration entry with the provided values including source, sensitivity, read-only flag, synonyms, type, and documentation. ```APIDOC ## ConfigEntry(String name, String value, ConfigEntry.ConfigSource source, boolean isSensitive, boolean isReadOnly, List synonyms, ConfigEntry.ConfigType type, String documentation) ### Description Creates a configuration entry with the provided values. ### Parameters - **name** (String) - Required - The configuration name. - **value** (String) - Required - The configuration value. - **source** (ConfigEntry.ConfigSource) - Required - The source of the configuration entry. - **isSensitive** (boolean) - Required - Whether the configuration value is sensitive. - **isReadOnly** (boolean) - Required - Whether the configuration is read-only. - **synonyms** (List) - Required - List of configuration synonyms. - **type** (ConfigEntry.ConfigType) - Required - The data type of the configuration entry. - **documentation** (String) - Required - The documentation for the configuration. ### Return Type - ConfigEntry ``` -------------------------------- ### paused() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Get the set of partitions that are currently paused. ```APIDOC ## paused() ### Description Get the set of partitions that are currently paused. ### Method paused ### Returns Set - The set of paused partitions. ``` -------------------------------- ### Subscription(List topics, ByteBuffer userData, List ownedPartitions, int generationId, Optional rackId) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/ConsumerPartitionAssignor.Subscription.html Creates a Subscription with the specified topics, user data, owned partitions, generation ID, and rack ID. ```APIDOC ## Subscription(List topics, ByteBuffer userData, List ownedPartitions, int generationId, Optional rackId) ### Description Creates a Subscription with the specified topics, user data, owned partitions, generation ID, and rack ID. ### Constructor Subscription(List topics, ByteBuffer userData, List ownedPartitions, int generationId, Optional rackId) ### Parameters - **topics** (List) - Required - The list of topics to subscribe to. - **userData** (ByteBuffer) - Required - User-defined data associated with the subscription. - **ownedPartitions** (List) - Required - The list of partitions owned by the consumer. - **generationId** (int) - Required - The generation ID of the subscription. - **rackId** (Optional) - Required - The rack ID of the consumer. ``` -------------------------------- ### metrics Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Gets the metrics kept by the admin client. ```APIDOC ## metrics ### Description Gets the metrics kept by the admin client. ### Method N/A (SDK method) ### Endpoint N/A ### Parameters None. ### Returns Map ``` -------------------------------- ### transactionStartTimeMs() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/TransactionDescription.html Returns the start time of the transaction in milliseconds, if available. ```APIDOC ## transactionStartTimeMs() ### Description Returns the start time of the transaction in milliseconds, if available. ### Method Signature `public OptionalLong transactionStartTimeMs()` ### Returns - **OptionalLong** - The transaction start time in milliseconds, or empty if not available. ``` -------------------------------- ### ListSerde() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/serialization/Serdes.ListSerde.html Creates a new ListSerde instance with default settings. ```APIDOC ## ListSerde() ### Description Creates a new ListSerde instance with default settings. ### Constructor `public ListSerde()` ### Parameters None. ### Returns A new ListSerde instance. ``` -------------------------------- ### metrics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/metrics/Metrics.html Gets all the metrics currently maintained indexed by metricName. ```APIDOC ## metrics() ### Description Gets all the metrics currently maintained indexed by metricName. ### Method metrics ### Returns - A Map of MetricName to KafkaMetric containing all current metrics. ``` -------------------------------- ### getSensor(String) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/metrics/Metrics.html Gets the sensor with the given name if it exists. ```APIDOC ## getSensor(String) ### Description Gets the sensor with the given name if it exists. ### Method getSensor ### Signature public Sensor getSensor(String name) ### Parameters - `name` (String) - Required - The name of the sensor ### Returns Sensor - Return the sensor or null if no such sensor exists ``` -------------------------------- ### Subscription(List topics, ByteBuffer userData, List ownedPartitions) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/ConsumerPartitionAssignor.Subscription.html Creates a Subscription with the specified topics, user data, and owned partitions. ```APIDOC ## Subscription(List topics, ByteBuffer userData, List ownedPartitions) ### Description Creates a Subscription with the specified topics, user data, and owned partitions. ### Constructor Subscription(List topics, ByteBuffer userData, List ownedPartitions) ### Parameters - **topics** (List) - Required - The list of topics to subscribe to. - **userData** (ByteBuffer) - Required - User-defined data associated with the subscription. - **ownedPartitions** (List) - Required - The list of partitions owned by the consumer. ``` -------------------------------- ### get() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/KafkaFuture.html Waits if necessary for this future to complete, and then returns its result. ```APIDOC ## get() ### Description Waits if necessary for this future to complete, and then returns its result. ### Method Signature `public abstract T get() throws InterruptedException, ExecutionException` ### Returns The result of the future. ### Throws - `InterruptedException` - if the current thread was interrupted while waiting. - `ExecutionException` - if the computation threw an exception. ### Specified By `get` in interface `Future` ``` -------------------------------- ### Cluster.bootstrap(List) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Creates a 'bootstrap' cluster using the given list of host/ports. ```APIDOC ## Cluster.bootstrap(List) ### Description Creates a 'bootstrap' cluster using the given list of host/ports. ### Method Static Factory Method ### Signature public static Cluster bootstrap(List addresses) ### Parameters - **addresses** (List) - The addresses. ### Returns A cluster for these hosts/ports. ``` -------------------------------- ### Cluster.partitionCountForTopic(String) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the number of partitions for the given topic. ```APIDOC ## Cluster.partitionCountForTopic(String) ### Description Gets the number of partitions for the given topic. ### Method Instance Method ### Signature public Integer partitionCountForTopic(String topic) ### Parameters - **topic** (String) - The topic to get the number of partitions for. ### Returns The number of partitions or null if there is no corresponding metadata. ``` -------------------------------- ### create(Properties props) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Creates a new Admin client with the given configuration properties. ```APIDOC ## create(Properties props) ### Description Creates a new Admin client with the given configuration properties. ### Method static Admin create(Properties props) ### Parameters - `props` (Properties) - Required - The configuration. ### Returns The new KafkaAdminClient. ``` -------------------------------- ### Cluster.partitionsForTopic(String) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the list of partitions for the given topic. ```APIDOC ## Cluster.partitionsForTopic(String) ### Description Gets the list of partitions for the given topic. ### Method Instance Method ### Signature public List partitionsForTopic(String topic) ### Parameters - **topic** (String) - The topic name. ### Returns A list of partitions. ``` -------------------------------- ### create(Map conf) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Creates a new Admin client with the given configuration map. ```APIDOC ## create(Map conf) ### Description Creates a new Admin client with the given configuration map. ### Method static Admin create(Map conf) ### Parameters - `conf` (Map) - Required - The configuration. ### Returns The new KafkaAdminClient. ``` -------------------------------- ### createClientSslEngine(String peerHost, int peerPort, String endpointIdentification) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/security/auth/SslEngineFactory.html Creates a new SSLEngine object to be used by the client. The peer host is used for endpoint validation if enabled, and the endpoint identification algorithm is specified for client mode. ```APIDOC ## createClientSslEngine(String peerHost, int peerPort, String endpointIdentification) ### Description Creates a new SSLEngine object to be used by the client. ### Method createClientSslEngine ### Parameters - **peerHost** (String) - The peer host to use. This is used in client mode if endpoint validation is enabled. - **peerPort** (int) - The peer port to use. This is a hint and not used for validation. - **endpointIdentification** (String) - Endpoint identification algorithm for client mode. ### Returns - **SSLEngine** - The new SSLEngine. ``` -------------------------------- ### Cluster.leaderFor(TopicPartition) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the current leader for the given topic-partition. ```APIDOC ## Cluster.leaderFor(TopicPartition) ### Description Gets the current leader for the given topic-partition. ### Method Instance Method ### Signature public Node leaderFor(TopicPartition topicPartition) ### Parameters - **topicPartition** (TopicPartition) - The topic and partition we want to know the leader for. ### Returns The node that is the leader for this topic-partition, or null if there is currently no leader. ``` -------------------------------- ### TopicPartitionInfo(int partition, Node leader, List replicas, List isr) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/TopicPartitionInfo.html Creates an instance of TopicPartitionInfo with the provided parameters. ```APIDOC ## Constructor: TopicPartitionInfo(int partition, Node leader, List replicas, List isr) ### Description Creates an instance of this class with the provided parameters. ### Parameters - **partition** (int) - Required - The partition id. - **leader** (Node) - Required - The leader of the partition or null if there is none. - **replicas** (List) - Required - The replicas of the partition in the same order as the replica assignment (the preferred replica is the head of the list). - **isr** (List) - Required - The in-sync replicas. ``` -------------------------------- ### assignment() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/Consumer.html Get the set of partitions currently assigned to this consumer. ```APIDOC ## assignment() ### Description Get the set of partitions currently assigned to this consumer. ### Method assignment ### Returns Set - The set of partitions currently assigned to this consumer. ### See Also - KafkaConsumer.assignment() ``` -------------------------------- ### describeLogDirs (with options) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/Admin.html Queries the information of all log directories on the given set of brokers with specified options. Requires broker version 1.0.0 or higher. ```APIDOC ## describeLogDirs (with options) ### Description Query the information of all log directories on the given set of brokers. This operation is supported by brokers with version 1.0.0 or higher. ### Method DescribeLogDirsResult describeLogDirs(Collection brokers, DescribeLogDirsOptions options) ### Parameters - `brokers` (Collection) - Required - A list of brokers - `options` (DescribeLogDirsOptions) - Required - The options to use when querying log dir info ### Returns The DescribeLogDirsResult ``` -------------------------------- ### OffsetSpec.earliestLocal() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/OffsetSpec.html Creates an OffsetSpec to retrieve the local log start offset. ```APIDOC ## OffsetSpec.earliestLocal() ### Description Used to retrieve the local log start offset. Local log start offset is the offset of a log above which reads are guaranteed to be served from the disk of the leader broker. Note: When tiered storage is not enabled, it behaves the same as retrieving the earliest timestamp offset. ### Method `public static OffsetSpec earliestLocal()` ### Returns - `OffsetSpec` - An OffsetSpec instance for the local log start offset. ``` -------------------------------- ### Method: currentTransactionStartOffset() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/ProducerState.html Returns the current transaction start offset, if available. ```APIDOC ## Method: currentTransactionStartOffset() ### Description Returns the current transaction start offset, if available. ### Method `public OptionalLong currentTransactionStartOffset()` ### Returns - **OptionalLong** - The current transaction start offset, or empty if not available. ``` -------------------------------- ### all() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/CreatePartitionsResult.html Returns a future which succeeds if all the partition creations succeed. ```APIDOC ## all() ### Description Returns a future which succeeds if all the partition creations succeed. ### Method all ### Return Type KafkaFuture ### Returns A future which succeeds if all the partition creations succeed. ``` -------------------------------- ### byte[] get() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/utils/Bytes.html Returns the underlying byte array of the Bytes instance. ```APIDOC ## Method: byte[] get() ### Description Get the data from the Bytes. ### Returns - **byte[]** - The underlying byte array. ``` -------------------------------- ### bootstrap(List addresses) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Creates a bootstrap cluster using the given list of host/ports. ```APIDOC ## Method: bootstrap ### Description Create a "bootstrap" cluster using the given list of host/ports. ### Signature public static Cluster bootstrap(List addresses) ### Parameters - **addresses** (List) - The list of host/ports. ### Returns - **Cluster** - A bootstrap cluster. ``` -------------------------------- ### wakeup() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/consumer/KafkaShareConsumer.html Wakes up the consumer. ```APIDOC ## Method: wakeup() ### Description Wake up the consumer. ### Returns void ``` -------------------------------- ### getSensor(String name) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/metrics/Metrics.html Gets the sensor with the given name if it exists. ```APIDOC ## getSensor(String name) ### Description Gets the sensor with the given name if it exists. ### Method Sensor getSensor(String name) ### Parameters - **name** (String) - Required - The name of the sensor. ### Returns Sensor - The sensor with the given name, or null if it does not exist. ``` -------------------------------- ### keystore() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/security/auth/SslEngineFactory.html Returns the keystore configured for this factory. ```APIDOC ## keystore() ### Description Returns keystore configured for this factory. ### Method keystore ### Returns - **KeyStore** - The keystore for this factory or null if a keystore is not configured. ``` -------------------------------- ### config() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/metrics/KafkaMetric.html Gets the configuration of this metric. This method is intended for server-side use only. ```APIDOC ## config() ### Description Gets the configuration of this metric. This method is intended for server-side use only. ### Method public MetricConfig config() ### Returns - **MetricConfig** - The configuration of this metric ``` -------------------------------- ### TokenBucket() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/metrics/stats/TokenBucket.html Constructs a TokenBucket instance with default time unit. ```APIDOC ## TokenBucket() ### Description Constructs a TokenBucket instance with default time unit. ### Constructor TokenBucket() ### Parameters None ### Returns A new TokenBucket instance. ``` -------------------------------- ### void configure(Map configs) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/metrics/JmxReporter.html Configures this class with the given key-value pairs. This method is called by the metrics system to set up the reporter. ```APIDOC ## void configure(Map configs) ### Description Configures this class with the given key-value pairs. This method is called by the metrics system to set up the reporter. ### Method `configure` ### Parameters - **configs** (Map) - Required - Configuration key-value pairs. ``` -------------------------------- ### KafkaFuture.toCompletionStage() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/KafkaFuture.html Abstract method that gets a CompletionStage with the same completion properties as this KafkaFuture. ```APIDOC ## KafkaFuture.toCompletionStage() ### Description Gets a CompletionStage with the same completion properties as this KafkaFuture. ### Method abstract CompletionStage toCompletionStage() ### Returns - **CompletionStage** - A CompletionStage with the same completion properties. ``` -------------------------------- ### ListConfigResourcesOptions() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/ListConfigResourcesOptions.html Constructs a new ListConfigResourcesOptions instance for use with Admin.listConfigResources(). ```APIDOC ## ListConfigResourcesOptions() ### Description Constructs a new ListConfigResourcesOptions instance for use with Admin.listConfigResources(). ### Constructor ListConfigResourcesOptions() ### Parameters None ### Usage Example ```java ListConfigResourcesOptions options = new ListConfigResourcesOptions(); ``` ``` -------------------------------- ### Cluster.topicName(Uuid) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the topic name for the given topic ID. ```APIDOC ## Cluster.topicName(Uuid) ### Description Gets the topic name for the given topic ID. ### Method Instance Method ### Signature public String topicName(Uuid topicId) ### Parameters - **topicId** (Uuid) - The topic ID. ### Returns The topic name. ``` -------------------------------- ### configs() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/NewTopic.html Returns the configuration for the new topic or null if no configs ever specified. ```APIDOC ## configs() ### Description Returns the configuration for the new topic or null if no configs ever specified. ### Method `public Map configs()` ### Returns - **Map** - The configuration for the new topic or null if no configs ever specified. ``` -------------------------------- ### Cluster.topicId(String) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the topic ID for the given topic name. ```APIDOC ## Cluster.topicId(String) ### Description Gets the topic ID for the given topic name. ### Method Instance Method ### Signature public Uuid topicId(String topic) ### Parameters - **topic** (String) - The topic name. ### Returns The topic ID. ``` -------------------------------- ### DescribeConfigsOptions() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/DescribeConfigsOptions.html Constructor for creating a new DescribeConfigsOptions instance. ```APIDOC ## DescribeConfigsOptions() ### Description Creates a new instance of DescribeConfigsOptions. ### Constructor `public DescribeConfigsOptions()` ### Usage Used to configure the describeConfigs operation in the Kafka Admin client. ``` -------------------------------- ### Cluster.availablePartitionsForTopic(String) Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/common/Cluster.html Gets the list of available partitions for the given topic. ```APIDOC ## Cluster.availablePartitionsForTopic(String) ### Description Gets the list of available partitions for the given topic. ### Method Instance Method ### Signature public List availablePartitionsForTopic(String topic) ### Parameters - **topic** (String) - The topic name. ### Returns A list of partitions. ``` -------------------------------- ### ReplicaInfo Constructor Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/admin/ReplicaInfo.html Creates a ReplicaInfo instance with the given size, offset lag, and future flag. ```APIDOC ## ReplicaInfo Constructor ### Description Creates a new ReplicaInfo object with the specified parameters. ### Constructor Signature `public ReplicaInfo(long size, long offsetLag, boolean isFuture)` ### Parameters - **size** (long) - Required - The total size of the log segments in this replica in bytes. - **offsetLag** (long) - Required - The lag of the log's LEO with respect to the partition's high watermark or the current replica's LEO. - **isFuture** (boolean) - Required - Whether this replica is a future replica created by an AlterReplicaLogDirsRequest. ### Usage Example ```java ReplicaInfo info = new ReplicaInfo(1024L, 5L, false); ``` ``` -------------------------------- ### commitCount Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/MockProducer.html Gets the total number of transactions committed by this mock producer. ```APIDOC ## commitCount ### Description Gets the total number of transactions committed by this mock producer. ### Method commitCount ### Signature `public long commitCount()` ### Returns - `long` - The total number of committed transactions. ``` -------------------------------- ### metrics() Source: https://javadoc.io/doc/org.apache.kafka/kafka-clients/latest/org/apache/kafka/clients/producer/KafkaProducer.html Gets the full set of internal metrics maintained by the producer. ```APIDOC ## metrics() ### Description Get the full set of internal metrics maintained by the producer. ### Method metrics ### Signature public Map metrics() ### Returns - **Map** - The full set of internal metrics maintained by the producer. ```