
Answer-first summary for fast verification
Answer: Attach the timestamp and Package ID on the outbound message from each publisher device as they are sent to Cloud Pub/Sub.
The correct answer is B. By attaching a timestamp and Package ID at the point of origin (publisher device), you ensure that each message has a clear and consistent timestamp associated with it from the moment it is generated. This provides a reliable and accurate record of when each package-tracking message was created, which is crucial for analyzing the data over time. This approach allows maintaining the chronological order of events as they occurred at the source, which is essential for real-time reporting and historical analysis. Other options may not provide accurate timestamps due to potential delays or issues in message processing, such as attaching timestamps in the subscriber application or using the NOW() function in BigQuery.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Flowlogistic is implementing a new real-time inventory tracking system. Previously, package-tracking messages were sent to an Apache Kafka cluster. However, with the new system, all tracking messages will be directed to a single Google Cloud Pub/Sub topic. A subscriber application will be responsible for processing these messages to allow for real-time reporting, and the processed data will be stored in Google BigQuery for future historical analysis. Considering these changes, which approach should you take to ensure that the package data can be effectively analyzed over time?
A
Attach the timestamp on each message in the Cloud Pub/Sub subscriber application as they are received.
B
Attach the timestamp and Package ID on the outbound message from each publisher device as they are sent to Cloud Pub/Sub.
C
Use the NOW() function in BigQuery to record the event's time.
D
Use the automatically generated timestamp from Cloud Pub/Sub to order the data.