apache / apache/beam

Unable to use KafkaIO with SSL via Python API

Open
#20,634 1 comment 0 reactions 0 assignees View on GitHub
cross-language improvement io kafka P3 python
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

I've come across the same issue described in BEAM-9627 while trying to use KafkaIO with SSL via the Python API.

While the solution in the Java API is to use withConsumerFactoryFn or withProducerFactoryFn and provide a custom function to download or generate key/trust stores before the consumer or producer gets created, there is no such functionality exposed via in the Python API since it's just a wrapper around the external transform.

Is there currently any other way to work around this issue in Python or would it be possible to expose a similar functionality in the API? (I'm using the Dataflow runner, but hopefully it shouldn't matter.)

As far as my understanding goes, alternatively one could write an external transform that's a thin wrapper around the Java's KafkaIO API that handles key/trust stores under the hood and make it available via an external expansion service, but that's definitely way less ideal than being able to achieve the same thing via the built-in API.

Imported from Jira [BEAM-11102](https://issues.apache.org/jira/browse/BEAM-11102). Original Jira may contain additional context.
Reported by: mwz.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.