Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Truststore and Google Cloud Dataflow

I need to use a trust store to make an SSL Kafka connection in Google Cloud Dataflow. Can I supply this from a bucket or is there a way to store this on the "local file system"?

like image 928
meunierd Avatar asked Jul 27 '26 08:07

meunierd


1 Answers

You can use KafkaIO.Read.withConsumerFactoryFn to supply a factory function that will be invoked to create the Kafka consumer. In that function, you're free to do anything you like, e.g. you can download the trust store file from a GCS bucket (I would recommend using GcsUtil for that) and save it to a temporary file on local disk - AFAIK Kafka itself only supports having this file on local disk. Then manually create a KafkaConsumer and point it at the file.

like image 190
jkff Avatar answered Jul 30 '26 02:07

jkff



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!