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 (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Adpese_1
Highly Voted 1 year, 4 months 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 6 months, 2 weeks ago
Selected Answer: A
Exactly-once delivery is not supported for push subscriptions in Google Cloud Pub/Sub.
upvoted 2 times
...
ravia__
7 months, 3 weeks ago
Selected Answer: D
pull subscription with both ordering and exactly-once delivery turned off
upvoted 1 times
...
mrgarfield
7 months, 3 weeks ago
Selected Answer: D
ordering & pull seems to be the most valid values for downstream service, don't U think ?
upvoted 3 times
...
mrgarfield
7 months, 4 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
1 year, 4 months ago
Selected Answer: C
i go for C : push subscription + exactly once delivery so ordering is guaranteed
upvoted 2 times
...
kapara
1 year, 4 months 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
1 year, 4 months 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
1 year, 4 months 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
1 year, 4 months 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
1 year, 4 months 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago