Skip to main content

What this is

The Pub/Sub Stream source is an inbound integration: it brings data into Zeotap CDP from a Google Pub/Sub topic that you own. You publish messages to your topic, Zeotap CDP consumes them from a subscription attached to that topic, and the records land in the source ready for preview and mapping. This page covers the streaming variant, which carries messages one at a time as they are published. If you want to hand Zeotap CDP messages in bundles instead, use Create a Pub/Sub Batch Source — it is a separate source with its own topic, its own flattened payload shape, and its own creation flow.
Pub/Sub appears in Zeotap CDP in both directions, and the names are similar. This page is the source (data in). To send data out of Zeotap CDP to a Pub/Sub topic, see the Google Pub/Sub destination instead.

Prerequisites

Before you begin, confirm the following:
  • You have access to the Sources application in the Zeotap CDP App, with permission to create a source.
  • You have a Google Pub/Sub topic to publish to, and you can read its Topic ID from the Pub/Sub catalog in the Google Cloud console.
  • You can grant permissions on that topic in Google Cloud, so that the Zeotap service account shown during source creation can attach a subscription to it.
  • You use a different Topic ID from the one used by any Pub/Sub Batch source. See Keep the stream and batch topics separate.
  • You know which Data Entity applies to the data you will send — Customer Data or Non Customer Data. See Supported data entities.
  • Your publisher can emit the JSON payload shape described in Send data in the expected format.

How the Pub/Sub Stream source works

Pub/Sub decouples the system producing messages from the system processing them. Messages are published to a topic, and any consumer interested in that topic subscribes to it and receives messages as they arrive. In this integration, your application is the publisher and Zeotap CDP is the consumer:
  1. You create the source in Zeotap CDP and give it the fully qualified Topic ID of your Pub/Sub topic.
  2. Zeotap CDP shows you a service account. You grant that account permission to attach a subscription to the topic in your Google Cloud project.
  3. Zeotap CDP consumes the published messages through that subscription and ingests them into the source.
Because the subscription is attached to the topic you name, the topic determines which source receives the data — which is why a stream source and a batch source should each have a topic of their own.

Prepare your Pub/Sub topic

A Topic ID in Google Pub/Sub is the unique identifier for a topic. Topics enable the categorisation or grouping of messages according to specific subjects or themes, and allow consumers to selectively subscribe to and receive messages based on their interest in specific topics. To obtain the Topic ID, navigate to the Pub/Sub catalog in the Google Cloud console, locate the desired topic, and click its name to view its details, where you can find the Topic ID. While creating a source in Zeotap CDP, you need to furnish the fully qualified Topic ID in the format: project/folder/topic/topic_id.

Keep the stream and batch topics separate

We recommend using different Topic IDs for Pub/Sub batch and stream sources. If you use the same Topic ID for both sources, you will receive the same data in both sources.

Create the Pub/Sub Stream source

Perform these steps in the Zeotap CDP App:
  1. Log into the Zeotap CDP App and navigate to the Sources application under Integrate.
  2. Click CREATE SOURCE.
  3. Choose Message Queue as the Category.
    Source creation flow with Message Queue chosen as the Category
  4. Click Pub/Sub Stream as the Data Source.
    Pub/Sub Stream selected as the Data Source under the Message Queue category
  5. Enter a short and descriptive name for the source.
  6. By default, the region is chosen as Europe (EU). See Region of storage for the country-to-region mapping Zeotap uses.
  7. Under Data Entity, choose either Customer Data or Non Customer Data, depending on the type of data that you want to ingest. See Supported data entities.
  8. Enter the Topic ID obtained from your Pub/Sub account, in the fully qualified format described under Prepare your Pub/Sub topic above.
  9. Under Service Account, note the Zeotap service account that is displayed. You will grant this account access on your topic in the next section, which is what allows Zeotap CDP to consume messages from Pub/Sub.
    Source creation form with the Service Account field
  10. Click CREATE SOURCE. Upon successful creation, the Topic ID and the service account used for the integration are displayed under the IMPLEMENTATION DETAILS tab, along with the rest of the information related to the integration.
    IMPLEMENTATION DETAILS tab of the created source listing the Topic ID and the service account

Grant the Zeotap service account access to your topic

A service account in Pub/Sub is a type of identity used to authenticate and authorise communication between Zeotap CDP and your Pub/Sub account. The account for your source is shown during source creation and on the source’s IMPLEMENTATION DETAILS tab. In your Pub/Sub instance, provide the following permission to that service account: Attach a subscription to a topic: pubsub.topics.attachSubscription Without this permission, Zeotap CDP cannot attach a subscription to your topic, and no messages reach the source.

Send data in the expected format

When sending data from the Pub/Sub streaming source to Zeotap CDP, ensure that you adhere to the following format. Replace the sample values with your own.
The records for the country and city columns are blacklisted for ingestion, because Zeotap CDP uses the user’s IP address to determine the country and city automatically. For the complete list of blacklisted fields, see Blacklisted fields for data ingestion.

Verify the integration

You have set the source up correctly when all of the following are true:
  • The source’s IMPLEMENTATION DETAILS tab shows the Topic ID and the service account you configured.
  • On the Sources listing page, the source moves from the Created status to Integrated once data starts flowing in. See Components of the Source Listing Page.
  • The source’s PREVIEW DATA tab shows a sample of the incoming records. See Components of the Preview Data tab.
If the source is still in the Created status after you have published messages, work through the section below.

Troubleshoot the integration

If you need any assistance to set up this integration, you can reach out to your Zeotap POC.

FAQ

The Pub/Sub Stream source carries messages as they are published to the topic. The Pub/Sub Batch source is a separate source type, created from the Pub/Sub - Batch data source tile, for messages handed over in bundles. Each has its own creation flow and its own payload shape — see Create a Pub/Sub Batch Source.
We recommend against it. If you use the same Topic ID for both sources, you will receive the same data in both sources. Use a separate topic for each.
No. This page creates a source, which brings data into Zeotap CDP. The Google Pub/Sub destination sends data out of Zeotap CDP to a Pub/Sub topic. They are configured separately, in different applications.
The Pub/Sub Stream source supports Customer Data (CE) and Non-Customer Entity (NCE) data. You choose which applies under Data Entity during source creation — see Supported data entities.
Open the source and go to the IMPLEMENTATION DETAILS tab. The Topic ID and the service account used for the integration are both listed there.

Next steps

Last modified on October 6, 2026