Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 276 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 276
Topic #: 1
[All Professional Cloud Developer Questions]

You recently developed an application that monitors a large number of stock prices. You need to configure Pub/Sub to receive a high volume messages and update the current stock price in a single large in-memory database. A downstream service needs the most up-to-date prices in the in-memory database to perform stock trading transactions. Each message contains three pieces or information:
• Stock symbol
• Stock price
• Timestamp for the update

How should you set up your Pub/Sub subscription?

  • A. Create a pull subscription with exactly-once delivery enabled.
  • B. Create a push subscription with both ordering and exactly-once delivery turned off.
  • C. Create a push subscription with exactly-once delivery enabled.
  • D. Create a pull subscription with both ordering and exactly-once delivery turned off.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Adpese_1
Highly Voted 11 months, 1 week ago
https://cloud.google.com/pubsub/docs/exactly-once-delivery "This page explains how to receive and acknowledge messages using exactly-once semantics. Only the pull subscription type supports exactly-once delivery, including subscribers that use the StreamingPull API. Push and export subscriptions don't support exactly-once delivery."
upvoted 8 times
...
anshad666
Most Recent 1 month, 2 weeks ago
Selected Answer: A
Exactly-once delivery is not supported for push subscriptions in Google Cloud Pub/Sub.
upvoted 2 times
...
ravia__
2 months, 2 weeks ago
Selected Answer: D
pull subscription with both ordering and exactly-once delivery turned off
upvoted 1 times
...
mrgarfield
2 months, 2 weeks ago
Selected Answer: D
ordering & pull seems to be the most valid values for downstream service, don't U think ?
upvoted 2 times
...
mrgarfield
2 months, 3 weeks ago
Selected Answer: C
In financial services we have to ensure that msg has been consumed ( ACK ) that's for sure, and push is faster, seems that C is the best option
upvoted 1 times
...
Kadhem
11 months ago
Selected Answer: C
i go for C : push subscription + exactly once delivery so ordering is guaranteed
upvoted 2 times
...
kapara
11 months, 2 weeks ago
duplicate from Question #271. IMHO the answer is C. need push, and fast ASAP without spend resource on ordering and so on.
upvoted 1 times
...
pbrvgl
11 months, 3 weeks ago
C is correct (I am not a contributor, so unable to vote). Rationale: 1. The downstream application needs only the most up-to-date value for a stock price. There's no need of historical values from a time series, so "ordering" does not make any sense in this scenario. This eliminates alternatives B and D. 2. Next choice is between "push" and "pull". In a "push" subscription, whenever the topic is fed with a new value, it will keep pushing it to the application until an acknowledgement is received. Latency is lower in this case. In a "pull" subscription, there's an additional burden on the application to keep pulling from the topic. This increases latency. A "push" subscription is recommended in such scenarios.
upvoted 3 times
...
plutonians123
11 months, 4 weeks ago
Selected Answer: A
This setup provides the necessary guarantees for message delivery without duplication, and the pull model allows your service to manage message consumption at a pace that ensures the integrity and timeliness of updates in your in-memory database.
upvoted 3 times
kapara
11 months, 2 weeks ago
i disagree bc this is STOCK! you have to know the fast as possible the the pricing of the stocks. so the answer is probably PUSH and not PULL.
upvoted 1 times
...
imiu
11 months, 3 weeks ago
do you have any link with documentation for this scenario please?
upvoted 1 times
...
...
MFay
11 months, 4 weeks ago
Selected Answer: C
C is the correct answer
upvoted 1 times
...
MFay
11 months, 4 weeks ago
Given the requirement for maintaining the most up-to-date stock prices in the in-memory database for trading transactions, the suitable setup for the Pub/Sub subscription would be option C: Create a push subscription with exactly-once delivery enabled. This ensures that messages are reliably delivered and processed exactly once, avoiding duplicates and ensuring that the downstream service receives the most recent stock price updates for accurate trading decisions.
upvoted 1 times
imiu
11 months, 3 weeks ago
do you have any link with documentation for this scenario please?
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...