Skip to content

Commit 285414d

Browse files
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.
1 parent 94d62d6 commit 285414d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

sdks/python/apache_beam/io/kafka.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@
6464
append_args=["--experiments=use_deprecated_read"]
6565
)
6666
67+
To use the legacy mode using Dataflow runner, the `use_unbounded_sdf_wrapper`
68+
flag should be specified within the IO expansion service. For example,
69+
70+
kafka.default_io_expansion_service(
71+
append_args=["--experiments=use_unbounded_sdf_wrapper"]
72+
)
73+
6774
*Option 2: specify a custom expansion service*
6875
6976
In this option, you startup your own expansion service and provide that as

0 commit comments

Comments
 (0)