google-cloud-pubsub

Google pubsub flow control

心不动则不痛 提交于 2021-01-04 06:01:14
问题 I'm trying to implement a service which consumes a google pubsub subscription at its own pace. By that, I mean I need fine control on when I need to consume messages i.e get a batch of messages, pause for a while, do not get more than X messages... Using google client libraries I did not find a way to do it as the MessageReceiver is running in its own thread and I don't have any control on what exactly happens. Basically, being able to consume messages in a synchronous way should solve my

Google pubsub flow control

假如想象 提交于 2021-01-04 06:01:01
问题 I'm trying to implement a service which consumes a google pubsub subscription at its own pace. By that, I mean I need fine control on when I need to consume messages i.e get a batch of messages, pause for a while, do not get more than X messages... Using google client libraries I did not find a way to do it as the MessageReceiver is running in its own thread and I don't have any control on what exactly happens. Basically, being able to consume messages in a synchronous way should solve my

Apache Spark’s Structured Streaming with Google PubSub

为君一笑 提交于 2021-01-01 04:14:32
问题 I'm using Spark Dstream to pull and process data from Google PubSub. I'm looking for a way to move to structured streaming but still using Pub/Sub. Also, I should mention that my messages are Snappy compressed in Pub/Sub. I found this issue which claims that using Pub/Sub with structured streaming is not supported. Is someone has encountered this problem? Is it possible to implement custom Receiver to read the data from Pub/Sub Thanks 回答1: The feature request you referenced is still accurate:

Gmail Pubsub - Infinite Push Notifications

旧街凉风 提交于 2020-12-13 03:27:25
问题 I'm trying to setup a flask endpoint so that whenever it receives a Gmail push notifications from PubSub, it sends a post request to another API/endpoint. However upon running the server, the process runs infinitely many times i.e. (receive notification, sends POST request to another API, returns 200 to PubSub) import Flask import requests app = Flask(__name__) # my endpoint receiving notifications from PubSub @app.route('/pubsub_notification_receiver') def receiver(): if request.method ==

Gmail Pubsub - Infinite Push Notifications

故事扮演 提交于 2020-12-13 03:25:51
问题 I'm trying to setup a flask endpoint so that whenever it receives a Gmail push notifications from PubSub, it sends a post request to another API/endpoint. However upon running the server, the process runs infinitely many times i.e. (receive notification, sends POST request to another API, returns 200 to PubSub) import Flask import requests app = Flask(__name__) # my endpoint receiving notifications from PubSub @app.route('/pubsub_notification_receiver') def receiver(): if request.method ==

Gmail Pubsub - Infinite Push Notifications

末鹿安然 提交于 2020-12-13 03:25:27
问题 I'm trying to setup a flask endpoint so that whenever it receives a Gmail push notifications from PubSub, it sends a post request to another API/endpoint. However upon running the server, the process runs infinitely many times i.e. (receive notification, sends POST request to another API, returns 200 to PubSub) import Flask import requests app = Flask(__name__) # my endpoint receiving notifications from PubSub @app.route('/pubsub_notification_receiver') def receiver(): if request.method ==

I am evaluating Google Pub/Sub vs Kafka? [closed]

天大地大妈咪最大 提交于 2020-11-30 02:20:31
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 11 months ago . Improve this question I have not worked on kafka much but wanted to build data pipeline in GCE. So we wanted to know Kafka vs PUB/Sub. Basically I want to know how message consistency, message availability, message reliability is maintained in both Kafka and Pub/sub Thanks 回答1:

I am evaluating Google Pub/Sub vs Kafka? [closed]

落花浮王杯 提交于 2020-11-30 02:17:45
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 11 months ago . Improve this question I have not worked on kafka much but wanted to build data pipeline in GCE. So we wanted to know Kafka vs PUB/Sub. Basically I want to know how message consistency, message availability, message reliability is maintained in both Kafka and Pub/sub Thanks 回答1:

pip install google-cloud-pubsub fails install in docker container

∥☆過路亽.° 提交于 2020-11-29 19:24:15
问题 I am trying to use a pupsub emulator. It starts but when I try to use my python script I get the following error ModuleNotFoundError: No module named 'google' So i try to install the module. RUN pip install google-cloud-pubsub error ERROR: Command errored out with exit status 1: command: /usr/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2hyoy1ly/grpcio/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2hyoy1ly/grpcio/setup.py'"'"';f=getattr(tokenize, '"'

How to invoke firebase Schedule functions locally using pubsub emulator

你。 提交于 2020-11-29 10:27:46
问题 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, but it triggered only once exports.scheduledFunctionPlainEnglish =functions.pubsub.schedule('every 2 minutes') .onRun((context) => { functions.logger.log("this runs every 2 minutes") return null; }) 回答1: This is currently not supported for scheduled