This guide shows step-by-step how to configure a listener for Google Pub/Sub to get a real-time feed of events from a Pub/Sub topic to a Foundry streaming dataset.
Google Pub/Sub can be used in conjunction with various Google Cloud services to route events to Foundry. For example, it can be used for streaming emails from a Gmail account. Review guidance provided by Google for streaming from Gmail ↗.
Learn more about Google Pub/Sub. ↗
Prior to configuration, ensure:
Your enrollment's ingress policy has been appropriately configured to accept Google Pub/Sub requests. You can either allow-list the IPs of your Google Cloud region ↗, or the countries. Learn how to Configure ingress. Note that the provider may alter the IPs anytime after the listener has been implemented and you would need to update ingress appropriately.
You have access to Pub/Sub in the Google Cloud Console.
Create a Pub/Sub topic if you do not already have one. This is the stream of events that will be pushed to your Foundry Listener.
Navigate to the Listeners tab in Data Connection. Create a Foundry Pub/Sub listener by selecting Google Cloud Pub/Sub from the listener type menu. This step will not finish setting up the listener, but is required to generate the listener URL which is then used in step 3.
Create a subscription for your Google Pub/Sub topic from step 1.
a. Select Push as the subscription type.
b. Copy the URL generated from step 2 into the URL field for your push subscription.
c. Tick the box to enable Authentication. Review Pub/Sub authentication information on external documentation. ↗
?token=<YOUR_TOKEN>
d. Save your subscription.
Copy the service account email address, optional audience claim, and optional shared secret into the listener configuration as shown below then Continue.
Administrator approval is now required from the Information Security Officer. Review the toggle description.
Select Start on the listener Test page to turn on your listener and start accepting events.
Send a test message to your topic, and see it appear in the listener test interface.
The payload arrives base64 encoded. You can decode it in a streaming pipeline using the base64 decode transformation board in order to get a string representation of the message.
All screenshots of Google Cloud Pub/Sub™ are provided for reference purposes only and are the property of Google LLC.