Questions tagged [google-cloud-pubsub]

For programming/API questions related to Google Cloud Pub/Sub, which provides asynchronous messaging and ingestion services for event-driven systems and streaming analytics on the Google Cloud Platform infrastructure.

The official documentation can be found here: https://cloud.google.com/pubsub/docs/overview

2920 questions
17
votes
2 answers

Writing to Google Cloud Storage from PubSub using Cloud Dataflow using DoFn

I am trying write Google PubSub messages to Google Cloud Storage using Google Cloud Dataflow. I know that TextIO/AvroIO do not support streaming pipelines. However, I read in [1] that it is possible to write to GCS in a streaming pipeline from a…
16
votes
2 answers

Can I use Google Cloud Pub/Sub across different Google Cloud projects?

Let's say I have project A, B and C in Google Cloud with several cloud functions in each one. I want to setup a Pub/Sub in project C so the functions in A and B can subscribe to. Is this possible? Do I need to setup some kind of service account with…
15
votes
1 answer

What is the difference between google.cloud.pubsub_v1 and google.cloud.pubsub?

I see both used in different documentation from Google: from google.cloud import pubsub Is found…
gunit
  • 3,700
  • 4
  • 31
  • 42
15
votes
2 answers

Google Cloud Functions to only Ack Pub/Sub on success (Problem resolved by GCP)

An early version of Google Cloud Functions had a limitation with regards to retries when errors occurred. They have since provided enhancements that resolve this issue. We are using a cloud function triggered by Pub/Sub to ensure delivery of an…
Geoffrey
  • 377
  • 2
  • 11
15
votes
2 answers

How to implement a light pub-sub service on App Engine?

During his Google I/O 2009 "Offline processing on App Engine: A look ahead" presentation (video, slides), Brett Slatkin presents the Task Queue service. He states that Pub-sub systems maximize transactions, decoupling: Large numbers of small…
nulltoken
  • 64,429
  • 20
  • 138
  • 130
15
votes
1 answer

Gmail API users.watch - no details for historyId

I have successfully set up Google Pub/Sub to use Gmail API Watch feature as described here: https://developers.google.com/gmail/api/guides/push to watch INBOX label in my gmail account. Once new message arrive I instantly get a push notification in…
Yaroslav Pogrebnyak
  • 1,117
  • 9
  • 22
15
votes
1 answer

How to do Junit Test with Google Cloud Pub/Sub

I'm using push pub/sub of Google Cloud Pub/Sub in my system,and I want to build my CI test code but I don't know how to do it.For example,some codes are like this: final Pubsub pubsub = PubsubUtils.getClient(); final PubsubMessage pubsubMessage =…
xialin
  • 265
  • 1
  • 2
  • 11
14
votes
3 answers

Insufficient tokens for quota 'administrator' and limit 'CLIENT_PROJECT-100s' of service 'pubsub.googleapis.com' for consumer 'project_number:#'

I sometimes get the following error when creating a subscription: Insufficient tokens for quota 'administrator' and limit 'CLIENT_PROJECT-100s' of service 'pubsub.googleapis.com' for consumer 'project_number:' Waiting it out does the trick, but…
IAmCoder
  • 3,179
  • 2
  • 27
  • 49
14
votes
1 answer

Google Cloud Pub/Sub - INVALID ARGUMENT error in Push subscription

I created a topic & then tried to create a Subscription with "Push" delivery type. When I use the domain https://www.omnea.com/push/google-handler (the link doesn't exist), it works. However, when I use the url…
Uma Ilango
  • 968
  • 4
  • 16
  • 31
14
votes
1 answer

with node.js on app engine, is it better to use task queues or pub/sub

We have been moving our apis from python to node. We have used task queues with our Python app engine apis. With node.js now supported on app engine, do you suggest we use task queues or cloud pub/sub for tasks? What would the pros / cons be for…
13
votes
2 answers

How to use Google Cloud PubSub and Run to handle resource-intensive long-running tasks?

I've got a Google Cloud PubSub topic which at times has thousands of messages and at times zero messages coming in. These messages represent tasks which can take upwards of an hour each. Preferably I'm able to use Cloud Run for this, as it scales…
13
votes
3 answers

Separate real time notification for staging and production in play console

Situation - User completes payments for subscription, the app sends purchase token to the backend with the user id. At the same time, we have also configured webhook, which also send same purchase token to map user id to same purchase token and we…
13
votes
6 answers

ImportError: cannot import name pubsub_v1

I need to import Pubsub_v1 and bigquery from google.cloud module. I have installed it and pip freeze shows below…
Shikha
  • 321
  • 1
  • 4
  • 19
13
votes
3 answers

How can I control acknowledgement in Cloud PubSub using Node.js

Basically I have created a cloud function(written a Node.js code) which will trigger on the message of cloud pubsub topic and will load that data to Bigquery table. A message in a topic gets deleted after reading it by cloud function. I understand…
Shawn
  • 537
  • 3
  • 7
  • 16
13
votes
3 answers

Can someone explain the difference between GCM and Google Pub/Sub

Google did answer the question here https://cloud.google.com/pubsub/faq But I'm still unclear on which scenarios would each be used for? Is there something that pub sub can do which GCM can't?