Pub/Sub notifications for job updates

This page explains how to configure a Pub/Sub topic that you can use to receive job status updates from the Transcoder API.

Configure job status updates

To receive job status updates, do the following:

  1. If you don't have an existing Pub/Sub topic, create a topic. To learn how to create a Pub/Sub topic, see Managing topics and subscriptions.

  2. Make sure to configure the pubsubDestination field in the job configuration.

    {
    "config":{
    "pubsubDestination":{
    "topic":"projects/PROJECT_ID/topics/my-topic-id"
    }
    }
    }
    
  3. Create a job to enable the Google-managed Transcoder service account.

  4. Find the service-PROJECT_NUMBER@gcp-sa-transcoder.iam.gserviceaccount.com service account in the Google Cloud console, where PROJECT_NUMBER is the project number of the project you enabled the Transcoder API in and you plan to create the feed from.

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM

    2. Select the Include Google-provided role grants checkbox.

  5. Make sure the service account has the pubsub.topics.publish permission enabled.

Job status reporting

Job status is reported once the job fails or finishes successfully. No other state changes are reported. Job status is reported using the JobResult message format:

ResourcePubSubMessage
{
job:{
object(JobResult)
}
}
JobResult
{
name:string;
state:string;
error:{
object(Status)
}
}

For more information, refer to the following:

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年12月15日 UTC.