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 249 discussion

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

You are developing an event-driven application. You have created a topic to receive messages sent to Pub/Sub. You want those messages to be processed in real time. You need the application to be independent from any other system and only incur costs when new messages arrive. How should you configure the architecture?

  • A. Deploy the application on Compute Engine. Use a Pub/Sub push subscription to process new messages in the topic.
  • B. Deploy your code on Cloud Functions. Use a Pub/Sub trigger to invoke the Cloud Function. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it.
  • C. Deploy the application on Google Kubernetes Engine. Use the Pub/Sub API to create a pull subscription to the Pub/Sub topic and read messages from it.
  • D. Deploy your code on Cloud Functions. Use a Pub/Sub trigger to handle new messages in the topic.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
d_ella2001
4 months, 2 weeks ago
Selected Answer: D
This option is the most suitable. Cloud Functions are fully managed and serverless, meaning you only incur costs when your code is executed in response to incoming messages. Using a Pub/Sub trigger ensures that the Cloud Function is invoked in real-time when new messages arrive in the topic, perfectly aligning with the requirements.
upvoted 1 times
...
alpha_canary
7 months, 3 weeks ago
Selected Answer: D
D: Deploying your code on Cloud Functions and using a Pub/Sub trigger to handle new messages in the topic allows for a real-time, event-driven architecture. Cloud Functions only incur costs when invoked, which aligns with the requirement to only incur costs when new messages arrive. B: With Cloud Functions, there's no need to manually create a pull subscription. The Pub/Sub trigger handles the message retrieval.
upvoted 2 times
...
JonathanSJ
9 months, 3 weeks ago
Selected Answer: D
I will go for D.
upvoted 1 times
...
examprof
11 months, 4 weeks ago
Alternative D is correct. A "push subscription" (not "pull"!) is more suitable when messages must be processed in real-time. Message ingested in the Pub/Sub topic, message pushed and retried recurrently until acknowledged.
upvoted 1 times
...
RaghuNanda
1 year, 1 month ago
Selected Answer: D
Not sure why we are complicating!! D is the right option
upvoted 1 times
...
__rajan__
1 year, 2 months ago
Selected Answer: D
I would go with D.
upvoted 1 times
...
purushi
1 year, 3 months ago
Selected Answer: B
B is a very detailed answer and it is a right choice. D is missing info like cloud function to subscribe pub sub topic to handle new messages.
upvoted 2 times
...
NewComer200
1 year, 7 months ago
Selected Answer: D
Selected Answer:D https://cloud.google.com/functions/docs/calling/pubsub We selected D based on our experience with Cloud Functions and the material at the URL above. Since messages can be obtained from Cloud Functions arguments, we are not aware of the description of Subscription. "only incur costs when new messages arrive." so it's OK to process on the trigger. I don't think real time means so strictly. For the life of me, I can't find any reason why D is wrong, and it seems to me that B is an error because of the extra processing.
upvoted 4 times
...
NewComer200
1 year, 7 months ago
Selected Answer:D https://cloud.google.com/functions/docs/calling/pubsub We selected D based on our experience with Cloud Functions and the material at the URL above. Since messages can be obtained from Cloud Functions arguments, we are not aware of the description of Subscription.
upvoted 2 times
...
Pime13
1 year, 9 months ago
took my exam yesterday (01-03-2023) and this question was there
upvoted 3 times
imiu
12 months ago
and what is the answer? option D?
upvoted 1 times
...
...
mrvergara
1 year, 9 months ago
Selected Answer: B
Option D is not ideal because using a Pub/Sub trigger to handle new messages in a topic is not the most efficient way to process messages in real time. In a trigger-based architecture, Cloud Functions are invoked only when new messages are available, so there is a possibility of delays in processing. On the other hand, Option B provides a more efficient architecture for real-time processing. A Cloud Function is invoked for each message received in the Pub/Sub topic, providing immediate processing as messages arrive. This way, the application is independent from any other system and incurs costs only when new messages arrive, fulfilling the requirements stated in the question.
upvoted 4 times
...
TNT87
1 year, 10 months ago
Selected Answer: B
https://cloud.google.com/solutions/event-driven-architecture-pubsub
upvoted 2 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 ...