Read from Apache Kafka to Dataflow
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Shows how to create a Dataflow pipeline that reads from Apache Kafka
Explore further
For detailed documentation that includes this code sample, see the following:
Code sample
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],[],[[["This content demonstrates how to create a Dataflow pipeline that reads data from Apache Kafka, utilizing both Java and Python code examples."],["The Java code example uses the Managed I/O transform to read messages from Kafka, extract the payload, convert it to a string, and write it to a text file."],["The Python example reads messages from a specified Kafka topic, extracts the message payload, subdivides the output into fixed 5-second windows, and then writes the data to a text file."],["Both examples highlight the importance of setting up Application Default Credentials (ADC) for authentication to Dataflow, with links provided to documentation for this process."],["You can find additional code samples for Dataflow and other Google Cloud products in the Google Cloud sample browser."]]],[]]