Your application publishes job requests¶
Preview
This feature is not subject to our service terms. Pre-GA features are available as is and might have limited support.
The following diagram illustrates how your application publishes a job request to one of the Pub/Sub topics:
Your application publishes job requests
- Your application connects to a Modigie Pub/Sub Repository, an instance of the Modigie Integration for Cloud Pub/Sub service. This repository includes its own Pub/Sub topics and a custom Google service account, the Application Account. Your application uses this account to authorize requests to Google Cloud APIs.
- Your application's client library uses the Application Account to retrieve a token from Google and signs all publish requests with that token.
- Your application publishes the workload, including required and optional input parameters and metadata, to your dedicated Cloud Pub/Sub topic for sending workload requests to Modigie.
For code samples that demonstrate how to publish messages with one of the official client libraries, see https://cloud.google.com/pubsub/docs/publish-receive-messages-client-library.
Batching messages¶
Your publisher can publish messages with job requests of the same job type in batches to improve efficiency and throughput. However, message batching does not impact the delivery of job results. Each message contains only a single job request, and every real-time job executes independently. The Modigie API publishes job results as soon as a job terminates (that is, its status is completed
, canceled
, rejected
, or failed
). Job results are not delivered in a specific order.
Failures at publishing¶
Your application should log failed publish requests to enable the configuration of alerts for increased failure rates or backlog size.
Transient failures can be retried, typically with exponential backoff.
Persistent authentication failures might indicate configuration problems that must be resolved before retries.
Job requests that your application cannot publish successfully do not enter Modigie, and you are not charged for them.
If your publisher processes a large number of messages, publish requests might accumulate in memory and eventually fail with a Deadline exceeded
error. For more information about best practices, see https://cloud.google.com/pubsub/docs/publish-best-practices.