Cloud PubSub Flashcards

1
Q

What is Cloud PubSub?

A

A fully managed messaging middleware service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Cloud PubSub key points (5)

A
  1. Allows messages between independent apps either within or outside of Google Cloud
  2. One to many, many to one, many to many
  3. Both push and pull messages.
  4. Messages are encrypted and HIPPA compliant
  5. Durable messaging - the messages will be kept as long as it is needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some use cases for Cloud PubSub? (3)

A
  1. Streaming data
  2. Event notifications
  3. Service to service communication to set up asynchronous workflows
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does Cloud PubSub work?

A
  1. The publisher sends a message.
  2. The message belongs to a topic.
  3. The topic has subscriptions attached to it.
  4. Subscribers can be subscribed to a particular subscription so that they will get the message.
  5. The subscriber sends an acknowledgement back to the subscription.
  6. Pub/Sub will wait the period of time set in the acknowledgement Deadline parameter (10-600 seconds) or specified by the retention period (the length of time to keep an un-deliverable message). After this time, the message will be deleted
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What delivery types are there for subscriptions in Cloud PubSub?

A

Push and Pull.
Pull -an application reads messages for a given subscription topic
Push - a subscription writes messages to an endpoint URL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you create subscriptions or topics via the shell for Cloud PubSub?

A

gcloud pubsub topics create [TOPIC NAME]

gcloud pubsub subscriptions create [SUBSCRIPTION NAME]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you send data to a topic via the shell in Cloud PubSub?

A

gcloud pubsub topics publish [TOPIC NAME] –message [MESSAGE]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you pull messages sent to a subscription in Cloud PubSub?

A

gcloud pubsub subscriptions pull –auto-ack [SUBSCRIPTION NAME]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly