I’m generating videos with the Google Gen AI SDK on Vertex AI using the Veo 2 model. My code sets a pubsubTopic in GenerateVideosConfig, but I don’t receive any Pub/Sub messages about generation progress.
private final Client client;
public VertexAiVideoGenerator() throws IOException {
var clientBuilder = Client.builder();
clientBuilder.vertexAI(true);
clientBuilder.project(PROJECT_ID);
clientBuilder.location(LOCATION);
clientBuilder.credentials(GoogleCredentials.getApplicationDefault());
this.client = clientBuilder.build();
}
public GenerateVideosOperation generate(String modelId, String prompt) {
Image image = Image.builder()
.gcsUri("gs://test-bucket/test.jpg")
.mimeType("image/jpeg")
.build();
var videoConfig = GenerateVideosConfig.builder()
.durationSeconds(10)
.numberOfVideos(2)
.outputGcsUri("gs://test-bucket")
.pubsubTopic("projects/PROJECT_ID/topics/TOPIC_NAME")
.build();
var operation = client.models.generateVideos(modelId, prompt, image, videoConfig);
return operation;
}
What I’ve tried:
Verified the topic exists and I created a subscription to it.
Checked that outputGcsUri is valid and the video is generated successfully in GCS.
Waited for several generations — still no Pub/Sub messages.
Question: What is required to make Vertex AI publish progress updates to my Pub/Sub topic for Veo video generation? Is there a specific service account or IAM role I need to grant on the topic?
Environment: Google Gen AI Java SDK, Veo 2 (veo-2.0-generate-001), Vertex AI on GCP.