Skip to content

Commit d9d9fcb

Browse files
KAFKA-19757: [1/N] Mark KIP-932 as generally available (#20856)
This is the first PR to mark KIP-932 as generally available. It removes warning messages, updates the javadoc and removes "Preview" from the docs. Reviewers: Apoorv Mittal <[email protected]>
1 parent 19fea36 commit d9d9fcb

File tree

7 files changed

+9
-18
lines changed

7 files changed

+9
-18
lines changed

clients/src/main/java/org/apache/kafka/clients/consumer/KafkaShareConsumer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@
5050

5151
/**
5252
* A client that consumes records from a Kafka cluster using a share group.
53-
* <p>
54-
* <em>This is a preview feature introduced by KIP-932. It is not yet recommended for production use.</em>
5553
*
5654
* <h3>Cross-Version Compatibility</h3>
5755
* This client can communicate with brokers that are a version that supports share groups. You will receive an

clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumerDelegateCreator.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
import org.apache.kafka.common.utils.LogContext;
2626
import org.apache.kafka.common.utils.Time;
2727

28-
import org.slf4j.Logger;
29-
3028
/**
3129
* {@code ShareConsumerDelegateCreator} implements a quasi-factory pattern to allow the caller to remain unaware of the
3230
* underlying {@link ShareConsumer} implementation that is created. This provides the means by which
@@ -43,9 +41,6 @@ public <K, V> ShareConsumerDelegate<K, V> create(final ConsumerConfig config,
4341
final Deserializer<K> keyDeserializer,
4442
final Deserializer<V> valueDeserializer) {
4543
try {
46-
LogContext logContext = new LogContext();
47-
Logger log = logContext.logger(getClass());
48-
log.warn("Share groups and KafkaShareConsumer are part of a preview feature introduced by KIP-932, and are not recommended for use in production.");
4944
return new ShareConsumerImpl<>(config, keyDeserializer, valueDeserializer);
5045
} catch (KafkaException e) {
5146
throw e;
@@ -65,8 +60,6 @@ public <K, V> ShareConsumerDelegate<K, V> create(final LogContext logContext,
6560
final SubscriptionState subscriptions,
6661
final ShareConsumerMetadata metadata) {
6762
try {
68-
Logger log = logContext.logger(getClass());
69-
log.warn("Share groups and KafkaShareConsumer are part of a preview feature introduced by KIP-932, and are not recommended for use in production.");
7063
return new ShareConsumerImpl<>(
7164
logContext,
7265
clientId,

docs/api.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ <h3 class="anchor-heading"><a id="consumerapi" class="anchor-link"></a><a href="
5555
&lt;version&gt;{{fullDotVersion}}&lt;/version&gt;
5656
&lt;/dependency&gt;</code></pre>
5757

58-
<h3 class="anchor-heading"><a id="shareconsumerapi" class="anchor-link"></a><a href="#shareconsumerapi">2.3 Share Consumer API (Preview)</a></h3>
58+
<h3 class="anchor-heading"><a id="shareconsumerapi" class="anchor-link"></a><a href="#shareconsumerapi">2.3 Share Consumer API</a></h3>
5959

60-
The Share Consumer API (Preview) enables applications within a share group to cooperatively consume and process data from Kafka topics.
60+
The Share Consumer API enables applications within a share group to cooperatively consume and process data from Kafka topics.
6161
<p>
6262
Examples of using the share consumer are shown in the
6363
<a href="/{{version}}/javadoc/index.html?org/apache/kafka/clients/consumer/KafkaShareConsumer.html" title="Kafka {{dotVersion}} Javadoc">javadocs</a>.

docs/design.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,6 @@ <h3 class="anchor-heading"><a id="usingtransactions" class="anchor-link"></a><a
358358

359359
<h3 class="anchor-heading"><a id="sharegroups" class="anchor-link"></a><a href="#sharegroups">4.8 Share groups</a></h3>
360360
<p>
361-
Share groups are available as a preview in Apache Kafka 4.1.
362-
<p>
363361
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.
364362
They offer an alternative to traditional consumer groups, particularly when applications require finer-grained sharing of partitions and records.
365363
<p>

docs/ops.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,6 @@ <h4 class="anchor-heading"><a id="basic_ops_consumer_group" class="anchor-link">
230230

231231
<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>
232232

233-
NOTE: Apache Kafka 4.1 ships with a preview of share groups which is not enabled by default. To enable share groups, use the <code>kafka-features.sh</code> tool to upgrade to <code>share.version=1</code>.
234-
For more information, please read the <a href="https://cwiki.apache.org/confluence/x/CIq3FQ"> release notes</a>.
235-
236-
<p>
237233
Use the ShareGroupCommand tool to list, describe, or delete the share groups. Only share groups without any active members can be deleted.
238234

239235
For example, to list all share groups in a cluster:

docs/toc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<ul>
3737
<li><a href="#producerapi">2.1 Producer API</a>
3838
<li><a href="#consumerapi">2.2 Consumer API</a>
39-
<li><a href="#shareconsumerapi">2.3 Share Consumer API (Preview)</a>
39+
<li><a href="#shareconsumerapi">2.3 Share Consumer API</a>
4040
<li><a href="#streamsapi">2.4 Streams API</a>
4141
<li><a href="#connectapi">2.5 Connect API</a>
4242
<li><a href="#adminapi">2.6 Admin API</a>

docs/upgrade.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ <h5><a id="upgrade_4_2_0_from" href="#upgrade_4_2_0_from">Upgrading Servers to 4
2525

2626
<h5><a id="upgrade_420_notable" href="#upgrade_420_notable">Notable changes in 4.2.0</a></h5>
2727
<ul>
28+
<li>
29+
Queues for Kafka (<a href="https://cwiki.apache.org/confluence/x/4hA0Dw">KIP-932</a>) is production-ready in Apache Kafka 4.2. This feature introduces a new kind of group called
30+
share groups, as an alternative to consumer groups. Consumers in a share group cooperatively consume records from topics, without assigning each partition to just one consumer.
31+
Share groups also introduce per-record acknowledgement and counting of delivery attempts. Use share groups in cases where records are processed one at a time, rather than as part
32+
of an ordered stream.
33+
</li>
2834
<li>
2935
The <code>org.apache.kafka.common.header.internals.RecordHeader</code> class has been updated to be read thread-safe. See <a href="https://cwiki.apache.org/confluence/x/nYmhFg">KIP-1205</a> for details.
3036
In other words, each individual <code>Header</code> object within a <code>ConsumerRecord</code>'s <code>headers</code> can now be safely read from multiple threads concurrently.

0 commit comments

Comments
 (0)