You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by yh...@apache.org on 2025/02/27 16:49:33 UTC

(beam) branch master updated: Update kafka.py (#34079)

This is an automated email from the ASF dual-hosted git repository.

yhu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 285414d0a5c Update kafka.py (#34079)
285414d0a5c is described below

commit 285414d0a5c6522d173c1f535946f46b9be6a7b7
Author: utkarshparekh <14...@users.noreply.github.com>
AuthorDate: Thu Feb 27 08:49:26 2025 -0800

    Update kafka.py (#34079)
    
    Updated the docstring to include a clear example of how to enable t the legacy mode (ReadFromKafkaViaUnbounded) in the ReadFromKafka transform. This helps users switch from the default mode (ReadFromKafkaViaSDF) based connector to the legacy connector for scenarios requiring fewer Kafka connections.
---
 sdks/python/apache_beam/io/kafka.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/sdks/python/apache_beam/io/kafka.py b/sdks/python/apache_beam/io/kafka.py
index 886bded8d08..3ed4737cd76 100644
--- a/sdks/python/apache_beam/io/kafka.py
+++ b/sdks/python/apache_beam/io/kafka.py
@@ -64,6 +64,13 @@
         append_args=["--experiments=use_deprecated_read"]
     )
 
+  To use the legacy mode using Dataflow runner, the `use_unbounded_sdf_wrapper`
+  flag should be specified within the IO expansion service. For example,
+
+    kafka.default_io_expansion_service(
+        append_args=["--experiments=use_unbounded_sdf_wrapper"]
+    )
+
   *Option 2: specify a custom expansion service*
 
   In this option, you startup your own expansion service and provide that as