Prepare and test your skills

Prepare and test your skills

Free sample question, answered and explained below. The Professional Data Engineer practice bank has 1,353 more like it. Try 10 free: instant score, no account.
An enterprise architecture team is designing a real-time streaming ingestion pipeline on Google Cloud using Cloud Pub/Sub to process events across multiple microservices. The Pub/Sub topic enforces an Apache Avro schema that evolves over time as upstream services add optional fields, creating multiple schema revisions.
The downstream subscriber applications maintain their own reader schema and must reliably deserialize incoming binary-encoded messages that may have been published under different schema revisions.
How should the subscriber application be architected to handle messages across evolving schema revisions?
This approach uses a dead-letter topic (DLT) to route and discard any messages that were published using older or differing schema revisions that do not match the latest version.
The organization enforced strict schema immutability and treated any message not matching the exact active revision as invalid, non-conforming data to be quarantined.
This approach attempts to decode binary-encoded Avro records using only the consumer application's local reader schema without supplying the corresponding writer schema.
googclient_schemarevisionid attribute provided by Pub/Sub.The messages were serialized with self-describing formats (such as JSON) where field names are explicitly present in every payload, or if schemas were completely immutable and guaranteed never to change.
When Cloud Pub/Sub enforces schemas on topics, it attaches system metadata attributes to published messages—such as googclient_schemaname, googclient_schemarevisionid, and googclient_schemaencoding. These attributes identify the exact schema and revision used by the publisher to serialize the message payload.
googclient_schemarevisionid attribute, the subscriber detects the exact writer schema revision used for encoding.Avro DatumReader with both schemas allows Avro to apply schema resolution rules (e.g., handling added optional fields or default values).schema_revision_id to avoid repeated remote API lookups to the Pub/Sub Schema service on every message.This pattern conforms to standard Avro binary schema resolution while utilizing Pub/Sub's native schema revision metadata, enabling decoupled, robust streaming ingestion pipelines.
This option presumes that Cloud Pub/Sub provides a managed server-side payload transformation layer to transcode and rewrite message bodies between different Avro schema revisions on the fly.
Pub/Sub offered an inline schema transformation service at the subscription layer, which is not part of the Pub/Sub messaging architecture.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated