Send feedback
  
   
 
  
    
      Configure Pub/Sub in Application Design Center 
  
      
     
  
  
  
   
  
    
  
  
    
    
    
    
    
    
  
    
      
      
        Preview
      
        
     
    
    
      
      
        
          This product is
        
        subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
        Service Specific
        Terms .
        
        Pre-GA products are available "as is" and might have limited support.
      
      For more information, see the
      launch stage descriptions .
  
  
   
    
Pub/Sub is an asynchronous and scalable messaging service that decouples
services producing messages from services processing those messages. For more
information, see What is Pub/Sub? 
This document describes the connections and parameters you can configure when
using App Design Center to create a Pub/Sub topic and
subscription. The configuration parameters are based on the terraform-google-pubsub  Terraform module.
Component connections 
The following table includes the components that you can connect to a
Pub/Sub topic or subscription, and the resulting updates to your
application and its generated Terraform code.
  
    Connected component
 
    Application updates
 
    Background information
 
   
   
    Compute Engine instance template 
 
    
        
          The Compute Engine instances can publish to and receive messages from the Pub/Sub topic. 
          The Pub/Sub topic ID is added to the Compute Engine instance template metadata. 
         
     
    Instance templates  
   
  
    Service account 
 
    
        
          The service account can manage Pub/Sub topics, and pull messages from subscriptions. 
          The roles/pubsub.editor role is added to the service account. 
          The service account name and email information is added to the Pub/Sub pull subscription. 
         
     
    Access control with IAM  
   
  
    BigQuery 
 
    
        
          The Pub/Sub subscription can write messages to the BigQuery dataset. 
          The BigQuery dataset information is added to the BigQuery subscription fields. 
         
     
    BigQuery subscriptions  
   
  
    Cloud Run 
 
    
        
          The Cloud Run service can receive messages or publish to the Pub/Sub topic. 
          The Pub/Sub topic ID is added to the Cloud Run environment variables. 
          The roles/pubsub.publisher and roles/pubsub.subscriber roles are added to the Cloud Run service account. 
          The Cloud Run service is added to the Pub/Sub push and pull subscription fields. 
         
     
    Use Pub/Sub with Cloud Run tutorial  
   
  
    Cloud Storage 
 
    
        
          The Pub/Sub subscription can write messages to the Cloud Storage bucket. 
          The Cloud Storage bucket information is added to the Pub/Sub subscription fields. 
         
     
    Cloud Storage subscriptions  
   
Required configuration parameters 
If your template includes a Pub/Sub component, you must configure the
following parameters before you deploy.
Optional configuration parameters 
The following parameters are optional. To display advanced parameters, in the
Configuration  area, select Show advanced fields .
  
    Feature
 
    Parameter name
 
    Description and constraint information
 
    Background information
 
   
  
     
    Create Topic  
    By default, a topic is created. Clear the checkbox if you don't want to create a topic. 
    Create a topic  
  
 
     
    Create Subscriptions  
    By default, a subscription is created. Clear the checkbox if you don't want to create a subscription. 
    Subscription overview  
  
 
    Topic Labels
 
    Key  
    labels  
    Reporting usage with labels  
  
 
    Value  
    labels  
    Reporting usage with labels  
  
 
    Push Subscriptions
 
    Name  
    name  
    Guidelines to name a topic, subscription, schema, or snapshot  
  
 
    Ack Deadline Seconds  
    ackDeadlineSeconds  
    Acknowledgment deadline  
  
 
    Push Endpoint  
    pushEndpoint  
    Endpoints  
  
 
    X-goog-version  
    The Pub/Sub API format of the pushed message. For example, v1beta1. 
    attributes  
  
 
    OIDC Service Account email  
    serviceAccountEmail  
    Authentication  
  
 
    Audience  
    audience  
    Authentication  
  
 
    Expiration Policy  
    expirationPolicy  
    Expiration period  
  
 
    Dead Letter Topic  
    deadLetterTopic  
    Dead letter topic  
  
  
    Retain Acked Messages  
    retainAckedMessages  
    Retain acknowledged messages  
  
 
    Message Retention Duration  
    messageRetentionDuration  
    Message retention duration  
  
 
    Max Delivery Attempts  
    maxDeliveryAttempts  
    Dead letter topic  
  
 
    Maximum Backoff  
    maximumBackoff  
    Retry policy  
  
 
    Minimum Backoff  
    minimumBackoff  
    Retry policy  
  
 
    Filter  
    filter  
    Subscription filter  
  
 
    Enable Message Ordering  
    enableMessageOrdering  
    Message ordering  
  
 
    Pull Subscriptions
 
    Name  
    name  
    Guidelines to name a topic, subscription, schema, or snapshot  
  
 
    Ack Deadline Seconds  
    ackDeadlineSeconds  
    Acknowledgment deadline  
  
 
    Dead Letter Topic  
    deadLetterTopic  
    Dead letter topic  
  
 
    Max Delivery Attempts  
    maxDeliveryAttempts  
    Dead letter topic  
  
 
    Retain Acked Messages  
    retainAckedMessages  
    Retain acknowledged messages  
  
 
    Message Retention Duration  
    messageRetentionDuration  
    Message retention duration  
  
 
    Maximum Backoff  
    maximumBackoff  
    Retry policy  
  
 
    Minimum Backoff  
    minimumBackoff  
    Retry policy  
  
 
    Filter  
    filter  
    Subscription filter  
  
 
    Enable Message Ordering  
    enableMessageOrdering  
    Message ordering  
  
 
    Service Account  
     
     
  
 
    Enable Exactly Once Delivery  
    enableExactlyOnceDelivery  
    Exactly-once delivery  
  
 
    BigQuery Subscriptions
 
    Name  
    name  
    Guidelines to name a topic, subscription, schema, or snapshot  
  
 
    Table  
    table  
    Create BigQuery subscriptions  
  
 
    Use Topic Schema  
    useTopicSchema  
    Use topic subscription  
  
 
    Use Table Schema  
    useTableSchema  
    Use table schema  
  
 
    Write Metadata  
    writeMetadata  
    Write metadata  
  
 
    Drop Unknown Fields  
    dropUnknownFields  
    Drop unknown fields  
  
 
    Ack Deadline Seconds  
    ackDeadlineSeconds  
    Acknowledgment deadline  
  
 
    Retain Acked Messages  
    retainAckedMessages  
    Retain acknowledged messages  
  
 
    Message Retention Duration  
    messageRetentionDuration  
    Message retention duration  
  
 
    Enable Message Ordering  
    enableMessageOrdering  
    Message ordering  
  
 
    Expiration Policy  
    expirationPolicy  
    Expiration period  
  
 
    Filter  
    filter  
    Subscription filter  
  
 
    Dead Letter Topic  
    deadLetterTopic  
    Dead letter topic  
  
 
    Maximum Backoff  
    maximumBackoff  
    Retry policy  
  
 
    Minimum Backoff  
    minimumBackoff  
    Retry policy  
  
 
    Cloud Storage Subscriptions
 
    Name  
    name  
    Guidelines to name a topic, subscription, schema, or snapshot  
  
 
    Bucket  
    bucket  
    Bucket name  
  
 
    Filename Prefix  
    filenamePrefix  
    Filename prefix, suffix, and datetime  
  
 
    Filename Suffix  
    filenameSuffix  
    Filename prefix, suffix, and datetime  
  
 
    Filename Datetime Format  
    filenameDatetimeFormat  
    Filename prefix, suffix, and datetime  
  
 
    Max Duration  
    maxDuration  
    File batching  
  
 
    Max Bytes  
    maxBytes  
    File batching  
  
 
    Max Messages  
    maxMessages  
    File batching  
  
 
    Output Format  
    textConfig  or avroConfig  
    File format  
  
 
    Write Metadata  
    writeMetadata  
    Write metadata  
  
 
    Use Topic Schema  
    useTopicSchema  
    Use topic schema  
  
 
    Ack Deadline Seconds  
    ackDeadlineSeconds  
    Acknowledgment deadline  
  
 
    Retain Acked Messages  
     
    Retain acknowledged messages  
  
 
    Message Retention Duration  
    messageRetentionDuration  
    Message retention duration  
  
 
    Enable Message Ordering  
    enableMessageOrdering  
    Message ordering  
  
 
    Expiration Policy  
    expirationPolicy  
    Expiration period  
  
 
    Filter  
    filter  
    Subscription filter  
  
 
    Dead Letter Topic  
    deadLetterTopic  
    Dead letter topic  
  
 
    Maximum Backoff  
    maximumBackoff  
    Retry policy  
  
 
    Minimum Backoff  
    minimumBackoff  
    Retry policy  
  
 
    Subscription Labels
 
    Key  
    labels  
    Reporting usage with labels  
  
 
    Value  
    labels  
    Reporting usage with labels  
  
 
     
    Topic Message Retention Duration  
    topicMessageRetentionDuration  
    Message retention duration  
  
 
     
    Topic KMS Key Name  
    kmsKeyName  
    Use a customer-managed encryption key (CMEK)  
  
 
     
    Grant BigQuery Project Roles  
    By default, the BigQuery Metadata Viewer  and BigQuery Data Editor  roles are granted to default Pub/Sub service account. If you don't want to grant these roles, clear the checkbox. 
    Assign BigQuery roles to the Pub/Sub service account  
  
 
     
    Grant Token Creator  
    By default, the Service Account Token Creator  role is granted to default Pub/Sub service account. If you don't want to grant this role, clear the checkbox. 
    Set up authentication for Pub/Sub  
  
  
    Schema
 
    Name  
    name  
    Important information about schemas  
  
 
    Type  
    type  
    Types of schemas  
  
 
    Definition  
    definition  
    Types of schemas  
  
 
    Encoding  
    encoding  
    Guidelines to associate a schema with a topic  
  
  
  
  
     
  
  
 
  
    
    
      
       
         
  
  
    
    Send feedback
  
   
 
       
    
    
  
  
 
  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.
  Last updated 2025-10-29 UTC.
 
 
  
  
    
    
    
      
  
  
    Need to tell us more?
  
   
 
     
  
  
    
      [[["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"]],["Last updated 2025-10-29 UTC."],[],[]]