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
12
votes
1 answer

How to Connect Google Play Real-Time Developer Notifications to Firebase Cloud Function via Pub/Sub?

I'm in the final stages of development for my new mobile app, but can't seem to find a way to allow Google Play Real-Time Developer Notifications to communicate to a firebase cloud function via the recommended Google Pub/Sub method. The expected…
12
votes
2 answers

priotizing a message on Google Pubsub

I have a pubsub topic with a number of pull subscriptions. I would like some mechanism where I can publish a message with a "priority" label that causes the message to jump as near to the front of the queue as possible. I don't need any guaranteed…
Alex Flint
  • 6,040
  • 8
  • 41
  • 80
12
votes
2 answers

How to publish message in Google Pub/Sub from Firebase Cloud Function?

I wrote a function that receive a http request and send a e-mail. But, I would like receive a http request and send a pub message. The problem is that the documentation is not clear. How I do that? This is my actual code. exports.weeklyEmail =…
12
votes
2 answers

GCP - Verify ownership of a cloud function https endpoint for a PubSub push

Pretty sure there's no way to do this but would be great to reach out to see if anyone else has any ideas. What I'm trying to do is this: I have 2 microservices hosted on Google Cloud Platform as cloud functions My first microservices does stuff…
12
votes
1 answer

Getting unencoded data from Google cloud Pub/Sub instead of base64

I'm attempting to use the Python library for Pub/Sub, but I keep getting this error: TypeError: Incorrect padding. Some quick googling revealed this issue: https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2527 However, this doesn't…
daoudc
  • 533
  • 2
  • 11
11
votes
1 answer

difference between topic/send_message_operation_count and topic/send_request_count in google pubsub

What is the difference between topic/send_message_operation_count and topic/send_request_count in google pubsub. The requirement is though i can calculate no.of messages present in subscriber by undeliver_messages but I need to calculate how many…
11
votes
1 answer

Apache Beam - Integration test with unbounded PCollection

We are building an integration test for an Apache Beam pipeline and are running into some issues. See below for context... Details about our pipeline: We use PubsubIO as our data source (unbounded PCollection) Intermediate transforms include a…
10
votes
4 answers

How to invoke firebase Schedule functions locally using pubsub emulator

I am working on cloud functions especially schedule functions. I need to trigger a function periodically each 5 minutes, but in only test step. I need to run it on pubsub emulator without deploying it. How to do it? I tried to use firebase shell,…
10
votes
7 answers

How to programmatically get current project id in Google cloud run api

I have an API that is containerized and running inside cloud run. How can I get the current project ID where my cloud run is executing? I have tried: I see it in textpayload in logs but I am not sure how to read the textpayload inside the post…
10
votes
2 answers

Google Cloud Function - ImportError: cannot import name 'pubsub' from 'google.cloud' (unknown location)

I am deploying a Google Cloud Function that will kick off other Google Cloud Functions using google.cloud.pubsub_v1 and I'm getting this error ImportError: cannot import name 'pubsub' from 'google.cloud' (unknown location) The beginning of my…
10
votes
4 answers

Publish non-string message in Cloud PubSub

Almost all of the examples of pub/sub available over web uses String messages. How do I publish message other than text messages like Java Object, JSON or AVRO to topic and then consume it through subscription. Many Thanks Pari
Pari
  • 1,443
  • 3
  • 19
  • 34
10
votes
2 answers

Is it possible to modify the global acknowledgement deadline for a PubSub subscription without re-creating it?

We have created a pull PubSub subscription with a default acknowledgement deadline of 10 seconds using the GCP web GUI. It turns out that we were too optimistic, and it takes our service more than 10 seconds to process a batch of pulled messages.…
msufa
  • 443
  • 3
  • 10
10
votes
1 answer

Google Cloud Pub/Sub API - Push E-mail

I'm using node.js to create an app that gets a PUSH from Gmail each time an email is received, checks it against a third party database in a CRM and creates a new field in the CRM if the e-mail is contained there. I'm having trouble using Google's…
Sekoul
  • 1,361
  • 2
  • 14
  • 30
9
votes
1 answer

November 1st 2020 / 'Account Hold' : is it mandatory to display an explanatory message to 'Account Hold' users?

It is mentioned here that a proper management of the 'Account Hold' status is required by November 1st, 2020. The doc says here : "When a user enters into account hold, you should leverage Real-time developer notifications to inform your user why…
toto_tata
  • 14,526
  • 27
  • 108
  • 198
9
votes
4 answers

google play in-app purchase notification for pub/sub topic

I'm trying to implement the backend of payment processor with google play in-app billing. Google play billing api is tottally built for serveless scenario and is being a hell of a work to make it work for a normal world situation where apps have…