ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 317 - Professional Data Engineer discussion

Report
Export

You work for a large ecommerce company. You are using Pub/Sub to ingest the clickstream data to Google Cloud for analytics. You observe that when a new subscriber connects to an existing topic to analyze data, they are unable to subscribe to older data for an upcoming yearly sale event in two months, you need a solution that, once implemented, will enable any new subscriber to read the last 30 days of data. What should you do?

A.
Create a new topic, and publish the last 30 days of data each time a new subscriber connects to an existing topic.
Answers
A.
Create a new topic, and publish the last 30 days of data each time a new subscriber connects to an existing topic.
B.
Set the topic retention policy to 30 days.
Answers
B.
Set the topic retention policy to 30 days.
C.
Set the subscriber retention policy to 30 days.
Answers
C.
Set the subscriber retention policy to 30 days.
D.
Ask the source system to re-push the data to Pub/Sub, and subscribe to it.
Answers
D.
Ask the source system to re-push the data to Pub/Sub, and subscribe to it.
Suggested answer: B

Explanation:

By setting the topic retention policy to 30 days, you can ensure that any new subscriber can access the messages that were published to the topic within the last 30 days1.This feature allows you to replay previously acknowledged messages or initialize new subscribers with historical data2.You can configure the topic retention policy by using the Cloud Console, the gcloud command-line tool, or the Pub/Sub API1.

Option A is not efficient, as it requires creating a new topic and duplicating the data for each new subscriber, which would increase the storage costs and complexity.Option C is not effective, as it only affects the unacknowledged messages in a subscription, and does not allow new subscribers to access older data3. Option D is not feasible, as it depends on the source system's ability and willingness to re-push the data, and it may cause data duplication or inconsistency.Reference:

1: Create a topic | Cloud Pub/Sub Documentation | Google Cloud

2: Replay and purge messages with seek | Cloud Pub/Sub Documentation | Google Cloud

3: When is a PubSub Subscription considered to be inactive?

asked 18/09/2024
Nipunika Jayasundara
36 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first