google-cloud-pubsub

Google PubSub - Counting messages in topic

风格不统一 提交于 2019-11-28 09:06:00
I've looked over the documentation for Google's PubSub, and also tried looking in Google Cloud Monitoring, but couldn't find any means of figuring out what's the queue size in my topics. Since I plan on using PubSub for analytics, it's important for me to monitor the queue count, so I could scale up/down the subscriber count. What am I missing? Kamal Aboul-Hosn The metric you want to look at is "undelivered messages." You should be able to set up alerts or charts that monitor this metric in Google Cloud Monitoring under the "Pub/Sub Subscription" resource type. The number of messages that have

Gmail API users.watch - no details for historyId

天大地大妈咪最大 提交于 2019-11-27 22:22:04
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 valid format like: { message: { data: '.......', attributes: {}, message_id: '1248700053943' }, subscription: '.....' } After I base64decode data I get email and historyId. Then, as suggested, I request gmail.users.history.list API (via API console) with startHistoryId set to the historyId from the push notification. And then get just empty response

google cloud pubsub node.js client not compatible with google cloud functions

假装没事ソ 提交于 2019-11-27 18:47:01
问题 Architecture: We have an architecture using 2 pubsub topic/subscription pairs: Topic T1 is triggered by a cronjob periodically (every 5 minutes for example). Subscription S1 is the trigger for our cloud function. Topic T2 serves as a queue for background jobs that are published by one of our services. Subscription S2 is read by the cloud function on each execution to service the queued background jobs. This allows us to control the frequency the background jobs are serviced independent of

How do I get notified when an object is uploaded to my GCS bucket?

做~自己de王妃 提交于 2019-11-27 14:32:12
I have an app that uploads photos regularly to a GCS bucket. When those photos are uploaded, I need to add thumbnails and do some analysis. How do I set up notifications for the bucket? The way to do this is to create a Cloud Pub/Sub topic for new objects and to configure your GCS bucket to publish messages to that topic when new objects are created. First, let's create a bucket PHOTOBUCKET: $ gsutil mb gs://PHOTOBUCKET Now, make sure you've activated the Cloud Pub/Sub API . Next, let's create a Cloud Pub/Sub topic and wire it to our GCS bucket with gsutil : $ gsutil notification create \ -t

Google PubSub - Counting messages in topic

痞子三分冷 提交于 2019-11-27 02:38:37
问题 I've looked over the documentation for Google's PubSub, and also tried looking in Google Cloud Monitoring, but couldn't find any means of figuring out what's the queue size in my topics. Since I plan on using PubSub for analytics, it's important for me to monitor the queue count, so I could scale up/down the subscriber count. What am I missing? 回答1: The metric you want to look at is "undelivered messages." You should be able to set up alerts or charts that monitor this metric in Google Cloud

Gmail API users.watch - no details for historyId

て烟熏妆下的殇ゞ 提交于 2019-11-26 23:09:31
问题 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 valid format like: { message: { data: '.......', attributes: {}, message_id: '1248700053943' }, subscription: '.....' } After I base64decode data I get email and historyId. Then, as suggested, I request gmail.users.history.list API (via API console

How do I get notified when an object is uploaded to my GCS bucket?

眉间皱痕 提交于 2019-11-26 16:38:12
问题 I have an app that uploads photos regularly to a GCS bucket. When those photos are uploaded, I need to add thumbnails and do some analysis. How do I set up notifications for the bucket? 回答1: The way to do this is to create a Cloud Pub/Sub topic for new objects and to configure your GCS bucket to publish messages to that topic when new objects are created. First, let's create a bucket PHOTOBUCKET: $ gsutil mb gs://PHOTOBUCKET Now, make sure you've activated the Cloud Pub/Sub API. Next, let's