moxiegirl commented on code in PR #19863:
URL: https://github.com/apache/kafka/pull/19863#discussion_r2122015901


##########
docs/api.html:
##########
@@ -55,7 +55,22 @@ <h3 class="anchor-heading"><a id="consumerapi" 
class="anchor-link"></a><a href="
        &lt;version&gt;{{fullDotVersion}}&lt;/version&gt;
 &lt;/dependency&gt;</code></pre>
 
-       <h3 class="anchor-heading"><a id="streamsapi" 
class="anchor-link"></a><a href="#streamsapi">2.3 Streams API</a></h3>
+       <h3 class="anchor-heading"><a id="shareconsumerapi" 
class="anchor-link"></a><a href="#shareconsumerapi">2.3 Share Consumer API 
(Preview)</a></h3>
+
+       The Share Consumer API (Preview) allows applications to work 
cooperatively to consume and process data from topics in the Kafka cluster as 
members
+       of share groups.
+       <p>
+               Examples showing how to use the share consumer are given in the

Review Comment:
   ```suggestion
                Examples of using the share consumer are show in the
   ```



##########
docs/api.html:
##########
@@ -55,7 +55,22 @@ <h3 class="anchor-heading"><a id="consumerapi" 
class="anchor-link"></a><a href="
        &lt;version&gt;{{fullDotVersion}}&lt;/version&gt;
 &lt;/dependency&gt;</code></pre>
 
-       <h3 class="anchor-heading"><a id="streamsapi" 
class="anchor-link"></a><a href="#streamsapi">2.3 Streams API</a></h3>
+       <h3 class="anchor-heading"><a id="shareconsumerapi" 
class="anchor-link"></a><a href="#shareconsumerapi">2.3 Share Consumer API 
(Preview)</a></h3>
+
+       The Share Consumer API (Preview) allows applications to work 
cooperatively to consume and process data from topics in the Kafka cluster as 
members

Review Comment:
   ```suggestion
        The Share Consumer API (Preview) enables applications within a share 
group to cooperatively consume and process data from Kafka topics.
   ```
   
   



##########
docs/configuration.html:
##########
@@ -205,56 +205,61 @@ <h3 class="anchor-heading"><a id="topicconfigs" 
class="anchor-link"></a><a href=
 
   <!--#include virtual="generated/topic_config.html" -->
 
-  <h3 class="anchor-heading"><a id="producerconfigs" 
class="anchor-link"></a><a href="#producerconfigs">3.3 Producer Configs</a></h3>
+  <h3 class="anchor-heading"><a id="groupconfigs" class="anchor-link"></a><a 
href="#groupconfigs">3.3 Group Configs</a></h3>
+
+  Below is the configuration of the groups:
+  <!--#include virtual="generated/group_config.html" -->
+
+  <h3 class="anchor-heading"><a id="producerconfigs" 
class="anchor-link"></a><a href="#producerconfigs">3.4 Producer Configs</a></h3>
 
   Below is the configuration of the producer:

Review Comment:
   ```suggestion
     Below is the producer configuration:
   ```



##########
docs/api.html:
##########
@@ -55,7 +55,22 @@ <h3 class="anchor-heading"><a id="consumerapi" 
class="anchor-link"></a><a href="
        &lt;version&gt;{{fullDotVersion}}&lt;/version&gt;
 &lt;/dependency&gt;</code></pre>
 
-       <h3 class="anchor-heading"><a id="streamsapi" 
class="anchor-link"></a><a href="#streamsapi">2.3 Streams API</a></h3>
+       <h3 class="anchor-heading"><a id="shareconsumerapi" 
class="anchor-link"></a><a href="#shareconsumerapi">2.3 Share Consumer API 
(Preview)</a></h3>
+
+       The Share Consumer API (Preview) allows applications to work 
cooperatively to consume and process data from topics in the Kafka cluster as 
members
+       of share groups.
+       <p>
+               Examples showing how to use the share consumer are given in the
+               <a 
href="/{{version}}/javadoc/index.html?org/apache/kafka/clients/consumer/KafkaShareConsumer.html"
 title="Kafka {{dotVersion}} Javadoc">javadocs</a>.
+       <p>
+               To use the share consumer, you can use the following maven 
dependency:

Review Comment:
   ```suggestion
                To use the share consumer, add the following Maven dependency 
to your project:
   ```



##########
docs/design.html:
##########
@@ -344,7 +344,43 @@ <h3 class="anchor-heading"><a id="usingtransactions" 
class="anchor-link"></a><a
     group will rebalance and fetch the last committed offset, which has the 
effect of rewinding back to the state before the transaction aborted. 
Alternatively, a more sophisticated application (such as the
     transactional message copier) can choose not to use 
<code>KafkaConsumer.committed</code> to retrieve the committed offset from 
Kafka, and then <code>KafkaConsumer.seek</code> to rewind the current position.
 
-    <h3 class="anchor-heading"><a id="replication" class="anchor-link"></a><a 
href="#replication">4.8 Replication</a></h3>
+    <h3 class="anchor-heading"><a id="sharegroups" class="anchor-link"></a><a 
href="#sharegroups">4.8 Share groups</a></h3>
+    <p>
+    Share groups are available as a preview in Apache Kafka 4.1.
+    <p>
+    Share groups allow Kafka consumers to work together cooperatively 
consuming and processing the records from topics. They are an alternative to 
consumer groups for situations in which finer-grained sharing is required.
+    <p>
+    The fundamental differences between a share group and a consumer group are:
+    <ul>
+        <li>The consumers in a share group cooperatively consume records with 
partitions that may be assigned to multiple consumers</li>
+        <li>The number of consumers in a share group can exceed the number of 
partitions in a topic</li>
+        <li>Records are acknowledged on an individual basis, although the 
system is optimized to work in batches for improved efficiency</li>
+        <li>Delivery attempts to consumers in a share group are counted to 
enable automated handling of unprocessable records</li>
+    </ul>
+    <p>
+    Share groups are a new type of group, alongside the existing consumer 
groups.
+    <p>
+    All consumers in the same share group subscribed to the same topic 
cooperatively consume the records of that topic. If a topic is accessed by 
consumers in more than one share group, each share group cooperatively
+    consumes from that topic independently of the other share groups.
+    <p>
+    Each consumer can dynamically set the list of topics it wants to subscribe 
to. In practice, all of the consumers in a share group will usually subscribe 
to the same topic or topics.

Review Comment:
   ```suggestion
     <p>
       Share groups are available as a preview in Apache Kafka 4.1.
   <p>
       Share groups are a new type of group, existing alongside traditional
       consumer groups. Share groups enable Kafka consumers to cooperatively
       consume and process records from topics. They offer an alternative to
       traditional consumer groups, particularly when applications require
       finer-grained sharing of partitions and records.
   
   <p>
       The fundamental differences between a share group and a consumer group:
   
   <ul>
       <li>Consumers within a share group cooperatively consume records, and 
partitions may be assigned to multiple consumers.</li>
       <li>The number of consumers in a share group can exceed the number of 
partitions in a topic.</li>
       <li>Records are acknowledged individually, though the system is 
optimized for batch processing to improve efficiency.</li>
       <li>Delivery attempts to consumers in a share group are counted, which 
enables automated handling of unprocessable records.</li>
   </ul>
   
   <p>
       All consumers in the same share group that are subscribed to the same 
topic will cooperatively consume the records of that topic. If a topic is 
accessed by consumers in multiple share groups, each share group consumes from 
that topic independently of the others.
   
   <p>
       Each consumer can dynamically set its list of subscribed topics. In 
practice, all consumers within a share group typically subscribe to the same 
topic or topics.
   ```



##########
docs/design.html:
##########
@@ -344,7 +344,43 @@ <h3 class="anchor-heading"><a id="usingtransactions" 
class="anchor-link"></a><a
     group will rebalance and fetch the last committed offset, which has the 
effect of rewinding back to the state before the transaction aborted. 
Alternatively, a more sophisticated application (such as the
     transactional message copier) can choose not to use 
<code>KafkaConsumer.committed</code> to retrieve the committed offset from 
Kafka, and then <code>KafkaConsumer.seek</code> to rewind the current position.
 
-    <h3 class="anchor-heading"><a id="replication" class="anchor-link"></a><a 
href="#replication">4.8 Replication</a></h3>
+    <h3 class="anchor-heading"><a id="sharegroups" class="anchor-link"></a><a 
href="#sharegroups">4.8 Share groups</a></h3>
+    <p>
+    Share groups are available as a preview in Apache Kafka 4.1.
+    <p>
+    Share groups allow Kafka consumers to work together cooperatively 
consuming and processing the records from topics. They are an alternative to 
consumer groups for situations in which finer-grained sharing is required.
+    <p>
+    The fundamental differences between a share group and a consumer group are:
+    <ul>
+        <li>The consumers in a share group cooperatively consume records with 
partitions that may be assigned to multiple consumers</li>
+        <li>The number of consumers in a share group can exceed the number of 
partitions in a topic</li>
+        <li>Records are acknowledged on an individual basis, although the 
system is optimized to work in batches for improved efficiency</li>
+        <li>Delivery attempts to consumers in a share group are counted to 
enable automated handling of unprocessable records</li>
+    </ul>
+    <p>
+    Share groups are a new type of group, alongside the existing consumer 
groups.
+    <p>
+    All consumers in the same share group subscribed to the same topic 
cooperatively consume the records of that topic. If a topic is accessed by 
consumers in more than one share group, each share group cooperatively
+    consumes from that topic independently of the other share groups.
+    <p>
+    Each consumer can dynamically set the list of topics it wants to subscribe 
to. In practice, all of the consumers in a share group will usually subscribe 
to the same topic or topics.
+    <p>
+    When a consumer in a share-group fetches records, it receives available 
records from any of the topic-partitions that match its subscriptions. Records 
are acquired for delivery to this consumer with a time-limited
+    acquisition lock. While a record is acquired, it is not available for 
another consumer. By default, the lock duration is 30s, but it can also be 
controlled using the group <code>share.record.lock.duration.ms</code>
+    configuration parameter. The idea is that the lock is automatically 
released once the lock duration has elapsed, and then the record is available 
to be given to another consumer. The consumer which holds the lock
+    can deal with it in the following ways:
+    <ul>
+        <li>The consumer can acknowledge successful processing of the 
record</li>
+        <li>The consumer can release the record, which makes the record 
available for another delivery attempt</li>
+        <li>The consumer can reject the record, which indicates that the 
record is unprocessable and does not make the record available for another 
delivery attempt</li>
+        <li>The consumer can do nothing, in which case the lock is 
automatically released when the lock duration has elapsed</li>
+    </ul>
+    <p>
+    The cluster limits the number of records acquired for consumers for each 
topic-partition in a share group. Once the limit is reached, fetching records 
will temporarily yield no further records until the number of
+    acquired records reduces, as naturally happens when the locks time out. 
This limit is controlled by the broker configuration property 
<code>group.share.partition.max.record.locks</code>. By limiting the duration
+    of the acquisition lock and automatically releasing the locks, the broker 
ensures delivery progresses even in the presence of consumer failures.

Review Comment:
   ```suggestion
   <p>
       When a consumer in a share group fetches records, it receives available
       records from any of the topic-partitions matching its subscriptions. 
Records
       are acquired for delivery to this consumer with a time-limited 
acquisition
       lock. While a record is acquired, it's unavailable to other consumers.
   </p>
   <p>
       By default, the lock duration is 30 seconds, but you can control it using
       the group configuration parameter 
<code>share.record.lock.duration.ms</code>
       configuration parameter. The lock is automatically released once its
       duration elapses, making the record available to another consumer. A
       consumer holding the lock can handle the record in the following ways:
   </p>
   <ul>
       <li>Acknowledge successful processing of the record.</li>
       <li>Release the record, making it available for another delivery 
attempt.</li>
       <li>Reject the record, indicating it's unprocessable and preventing 
further delivery attempts for that record.</li>
       <li>Do nothing, in which case the lock is automatically released when 
its duration expires.</li>
   </ul>
   
   <p>
       The Kafka cluster limits the number of records acquired for consumers for
       each topic-partition within a share group. Once this limit is reached,
       fetching operations will temporarily yield no further records until the
       number of acquired records decreases (as locks naturally time out). This
       limit is controlled by the broker configuration property
       <code>group.share.partition.max.record.locks</code>. By limiting the
       duration of the acquisition lock and automatically releasing the locks, 
the
       broker ensures delivery progresses even in the presence of consumer
       failures.
   
   ```



##########
docs/api.html:
##########
@@ -55,7 +55,22 @@ <h3 class="anchor-heading"><a id="consumerapi" 
class="anchor-link"></a><a href="
        &lt;version&gt;{{fullDotVersion}}&lt;/version&gt;
 &lt;/dependency&gt;</code></pre>
 
-       <h3 class="anchor-heading"><a id="streamsapi" 
class="anchor-link"></a><a href="#streamsapi">2.3 Streams API</a></h3>
+       <h3 class="anchor-heading"><a id="shareconsumerapi" 
class="anchor-link"></a><a href="#shareconsumerapi">2.3 Share Consumer API 
(Preview)</a></h3>
+
+       The Share Consumer API (Preview) allows applications to work 
cooperatively to consume and process data from topics in the Kafka cluster as 
members
+       of share groups.

Review Comment:
   ```suggestion
   ```



##########
docs/configuration.html:
##########
@@ -205,56 +205,61 @@ <h3 class="anchor-heading"><a id="topicconfigs" 
class="anchor-link"></a><a href=
 
   <!--#include virtual="generated/topic_config.html" -->
 
-  <h3 class="anchor-heading"><a id="producerconfigs" 
class="anchor-link"></a><a href="#producerconfigs">3.3 Producer Configs</a></h3>
+  <h3 class="anchor-heading"><a id="groupconfigs" class="anchor-link"></a><a 
href="#groupconfigs">3.3 Group Configs</a></h3>
+
+  Below is the configuration of the groups:
+  <!--#include virtual="generated/group_config.html" -->
+
+  <h3 class="anchor-heading"><a id="producerconfigs" 
class="anchor-link"></a><a href="#producerconfigs">3.4 Producer Configs</a></h3>
 
   Below is the configuration of the producer:
   <!--#include virtual="generated/producer_config.html" -->
 
-  <h3 class="anchor-heading"><a id="consumerconfigs" 
class="anchor-link"></a><a href="#consumerconfigs">3.4 Consumer Configs</a></h3>
+  <h3 class="anchor-heading"><a id="consumerconfigs" 
class="anchor-link"></a><a href="#consumerconfigs">3.5 Consumer Configs</a></h3>
 
-  Below is the configuration for the consumer:
+  Below is the configuration for the consumer and share consumer:

Review Comment:
   Below is the consumer and share consumer configuration:



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --list
+my-share-group</code></pre>
+
+  To view the current start offset, the "--describe" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group
+GROUP           TOPIC           PARTITION  START-OFFSET
+my-share-group  topic1          0          4</code></pre>
+
+  Note that the admin client needs DESCRIBE access to all the topics used in 
the group.

Review Comment:
   ```suggestion
     NOTE: The admin client needs DESCRIBE access to all the topics used in the 
group.
   ```



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:

Review Comment:
   ```suggestion
     Use the ShareGroupCommand tool to list, describe, or delete share groups. 
Only share groups without any active members can be deleted.  For example, to 
list all share groups in a cluster:
   ```



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --list
+my-share-group</code></pre>
+
+  To view the current start offset, the "--describe" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group
+GROUP           TOPIC           PARTITION  START-OFFSET
+my-share-group  topic1          0          4</code></pre>
+
+  Note that the admin client needs DESCRIBE access to all the topics used in 
the group.
+
+  There are a number of additional "describe" options that can be used to 
provide more detailed information about a share group:
+  <ul>
+    <li>--members: This option provides the list of all active members in the 
share group.

Review Comment:
   ```suggestion
       <li>--members: Lists all active members in the share group.
   ```



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --list
+my-share-group</code></pre>
+
+  To view the current start offset, the "--describe" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group
+GROUP           TOPIC           PARTITION  START-OFFSET
+my-share-group  topic1          0          4</code></pre>
+
+  Note that the admin client needs DESCRIBE access to all the topics used in 
the group.
+
+  There are a number of additional "describe" options that can be used to 
provide more detailed information about a share group:

Review Comment:
   ```suggestion
     There are many --describe options that provide more detailed information 
about a share group:
   ```



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --list
+my-share-group</code></pre>
+
+  To view the current start offset, the "--describe" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group
+GROUP           TOPIC           PARTITION  START-OFFSET
+my-share-group  topic1          0          4</code></pre>
+
+  Note that the admin client needs DESCRIBE access to all the topics used in 
the group.
+
+  There are a number of additional "describe" options that can be used to 
provide more detailed information about a share group:
+  <ul>
+    <li>--members: This option provides the list of all active members in the 
share group.
+      <pre><code class="language-bash">bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group --members
+GROUP           CONSUMER-ID            HOST            CLIENT-ID              
#PARTITIONS  ASSIGNMENT
+my-share-group  94wrSQNmRda9Q6sk6jMO6Q /127.0.0.1      console-share-consumer 
1            topic1:0
+my-share-group  EfI0sha8QSKSrL_-I_zaTA /127.0.0.1      console-share-consumer 
1            topic1:0</code></pre>
+      You can see that both members have been assigned the same partition 
which they are sharing.

Review Comment:
   ```suggestion
         You can see that both members are assigned to and sharing the same 
partition.
   ```



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --list
+my-share-group</code></pre>
+
+  To view the current start offset, the "--describe" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group
+GROUP           TOPIC           PARTITION  START-OFFSET
+my-share-group  topic1          0          4</code></pre>
+
+  Note that the admin client needs DESCRIBE access to all the topics used in 
the group.
+
+  There are a number of additional "describe" options that can be used to 
provide more detailed information about a share group:
+  <ul>
+    <li>--members: This option provides the list of all active members in the 
share group.
+      <pre><code class="language-bash">bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group --members
+GROUP           CONSUMER-ID            HOST            CLIENT-ID              
#PARTITIONS  ASSIGNMENT
+my-share-group  94wrSQNmRda9Q6sk6jMO6Q /127.0.0.1      console-share-consumer 
1            topic1:0
+my-share-group  EfI0sha8QSKSrL_-I_zaTA /127.0.0.1      console-share-consumer 
1            topic1:0</code></pre>
+      You can see that both members have been assigned the same partition 
which they are sharing.
+    </li>
+    <li>--offsets: This is the default describe option and provides the same 
output as the "--describe" option.</li>
+    <li>--state: This option provides useful group-level information.
+      <pre><code class="language-bash">bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group --state
+GROUP           COORDINATOR (ID)          STATE           #MEMBERS
+my-share-group  localhost:9092  (1)       Stable          2</code></pre>
+    </li>
+  </ul>
+
+  <p>To delete the offsets of individual topics in the share group, the 
"--delete-offsets" option can be used:

Review Comment:
   ```suggestion
     <p>To delete the offsets of individual topics in the share group, use the 
"--delete-offsets" option:
   ```
   Simple declarative. 



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --list
+my-share-group</code></pre>
+
+  To view the current start offset, the "--describe" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group
+GROUP           TOPIC           PARTITION  START-OFFSET
+my-share-group  topic1          0          4</code></pre>
+
+  Note that the admin client needs DESCRIBE access to all the topics used in 
the group.
+
+  There are a number of additional "describe" options that can be used to 
provide more detailed information about a share group:
+  <ul>
+    <li>--members: This option provides the list of all active members in the 
share group.
+      <pre><code class="language-bash">bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group --members
+GROUP           CONSUMER-ID            HOST            CLIENT-ID              
#PARTITIONS  ASSIGNMENT
+my-share-group  94wrSQNmRda9Q6sk6jMO6Q /127.0.0.1      console-share-consumer 
1            topic1:0
+my-share-group  EfI0sha8QSKSrL_-I_zaTA /127.0.0.1      console-share-consumer 
1            topic1:0</code></pre>
+      You can see that both members have been assigned the same partition 
which they are sharing.
+    </li>
+    <li>--offsets: This is the default describe option and provides the same 
output as the "--describe" option.</li>

Review Comment:
   ```suggestion
       <li>--offsets: The default describe option. This provides the same 
output as the "--describe" option.</li>
   ```
   In consistency as sometimes DESCRIBE sometimes --describe and sometimes 
"--describe".  I'd check against other coding of option elements in the html 
docs.



##########
docs/ops.html:
##########
@@ -213,11 +224,54 @@ <h4 class="anchor-heading"><a 
id="basic_ops_consumer_group" class="anchor-link">
   <p>
   For example, to reset offsets of a consumer group to the latest offset:
 
-  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group consumergroup1 
--topic topic1 --to-latest
+  <pre><code class="language-bash">$ bin/kafka-consumer-groups.sh 
--bootstrap-server localhost:9092 --reset-offsets --group my-group --topic 
topic1 --to-latest
 TOPIC                          PARTITION  NEW-OFFSET
 topic1                         0          0</code></pre>
 
-  <p>
+  <h4 class="anchor-heading"><a id="basic_ops_share_group" 
class="anchor-link"></a><a href="#basic_ops_share_group">Managing share 
groups</a></h4>
+
+  With the ShareGroupCommand tool, we can list, describe, or delete the share 
groups. The share group can be deleted only if the group does not have any 
active members.
+
+  For example, to list all share groups in the cluster:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --list
+my-share-group</code></pre>
+
+  To view the current start offset, the "--describe" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group
+GROUP           TOPIC           PARTITION  START-OFFSET
+my-share-group  topic1          0          4</code></pre>
+
+  Note that the admin client needs DESCRIBE access to all the topics used in 
the group.
+
+  There are a number of additional "describe" options that can be used to 
provide more detailed information about a share group:
+  <ul>
+    <li>--members: This option provides the list of all active members in the 
share group.
+      <pre><code class="language-bash">bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group --members
+GROUP           CONSUMER-ID            HOST            CLIENT-ID              
#PARTITIONS  ASSIGNMENT
+my-share-group  94wrSQNmRda9Q6sk6jMO6Q /127.0.0.1      console-share-consumer 
1            topic1:0
+my-share-group  EfI0sha8QSKSrL_-I_zaTA /127.0.0.1      console-share-consumer 
1            topic1:0</code></pre>
+      You can see that both members have been assigned the same partition 
which they are sharing.
+    </li>
+    <li>--offsets: This is the default describe option and provides the same 
output as the "--describe" option.</li>
+    <li>--state: This option provides useful group-level information.
+      <pre><code class="language-bash">bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --describe --group my-share-group --state
+GROUP           COORDINATOR (ID)          STATE           #MEMBERS
+my-share-group  localhost:9092  (1)       Stable          2</code></pre>
+    </li>
+  </ul>
+
+  <p>To delete the offsets of individual topics in the share group, the 
"--delete-offsets" option can be used:
+
+  <pre><code class="language-bash">$ bin/kafka-share-groups.sh 
--bootstrap-server localhost:9092 --delete-offsets --group my-share-group 
--topic topic1
+TOPIC           STATUS
+topic1          Successful</code></pre>
+
+  <p>To delete one or more share groups, the "--delete" option can be used:

Review Comment:
   ```suggestion
     <p>To delete one or more share groups, use the "--delete" option:
   ```



##########
docs/upgrade.html:
##########
@@ -24,6 +24,13 @@ <h4><a id="upgrade_4_1_0" href="#upgrade_4_1_0">Upgrading to 
4.1.0</a></h4>
 <h5><a id="upgrade_4_1_0" href="#upgrade_4_1_0">Upgrading Servers to 4.1.0 
from any version 3.3.x through 4.0.x</a></h5>
     <h6><a id="upgrade_410_notable" href="#upgrade_410_notable">Notable 
changes in 4.1.0</a></h6>
         <ul>
+            <li>
+                Apache Kafka 4.1 ships with a preview of Queues for Kafka (<a 
href="https://cwiki.apache.org/confluence/x/4hA0Dw";>KIP-932</a>). This feature 
introduces a new kind of group called
+                share groups, as an alternative to consumer groups. The 
consumers in a share group cooperatively consume records from topics, without 
assigning each partition to just one consumer.
+                Share groups also introduce per-record acknowledgement and 
counting of delivery attempts. Share groups are well suited to use cases in 
which the records are being processed
+                one at a time, rather than as part of an ordered stream. To 
enable share groups, use the <code>kafka-features.sh</code> tool to upgrade to 
<code>share.version=1</code>.
+                For more information, please read the <a 
href="https://cwiki.apache.org/confluence/x/CIq3FQ";> release notes</a>.

Review Comment:
   ```suggestion
                   Apache Kafka 4.1 ships with a preview of Queues for Kafka (<a
   href="https://cwiki.apache.org/confluence/x/4hA0Dw";>KIP-932</a>). This 
feature
   introduces a new kind of group called share groups, as an alternative to
   consumer groups. Consumers in a share group cooperatively consume records
   from topics, without assigning each partition to a single consumer. Share 
groups
   also introduce per-record acknowledgement and counting of delivery attempts.
   Use share groups in cases where records processed one at a time, rather than 
as
   part of an ordered stream. To enable share groups, use the
   <code>kafka-features.sh</code> tool to upgrade to
   <code>share.version=1</code>. For more information, please read the <a
   href="https://cwiki.apache.org/confluence/x/CIq3FQ";> release 
notes</a>.notes</a>.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to