In this small project I use Java to consume data from Google Cloud new york taxi tycoon topic, and send it to an on Premises Kafka topic, for further processing.
-
First one must setup a subscription on Google Cloud, the steps are explained on the link above.
-
Second: configure Java to authenticate with your Google Cloud Service Account
-
Third: configure Java to produce messages to a Kafka topic
-
Fourth: configure the Pub/Sub client
-
Fifth: Consume data with Pub/Sub and send it to Kafka. Congratz!