get metrics for google cloud pubsub - publish-subscribe

I am using google cloud pubsub and I want to know about how to get number of outstanding, delivered and undelivered messages in pubsub. Is there any available api provided by google pubsub for this?

You'll want to look at Stackdriver Monitoring. In particular, there are metrics for Google Cloud Pub/Sub, including subscription/num_undelivered_messages and subscription/num_outstanding_messages. You can also access graphs of these properties in Stackdriver.

Related

Can IBM Watson Assistant use more than one webhook

I am making a chat bot that requires the use of 3 external APIs to be used as responses. When wanting to call an external API from within Watson Assistant, webhooks would be required to connect to one API either locally or on the cloud (IBM functions). How would I connect more than one API to the assistant if possible ?
Unfortunately no, not at this time. The design was meant to have a middleware app that orchestrated the apis, formats the data, etc just like the video in the docs.

AWS API gateway rate limiting usage notification for the consumer

Is there a way to notify the client that they are reaching their limit on their usage plan?
Looked at Cloud Watch, unfortunately, doesn't provide usage down to a key level
One approach is to write a scheduled Lambda function to send notifications to consumers by getting the usage quota using AWS SDK for API Gateway by invoking getUsagePlan method.

Google pubsub to Google cloud storage

Is it possible for a bucket in cloud storage to receive data/messages from pubSub? if yes then how??
Currently i am publishing messages to pubsub
and i want to use pull delivery type (for that i have to provide endpoint URL for the bucket, which i couldn't find anywhere)
I found this somewhere in there docs
But it didn't work.
No, sorry. GCS only accepts uploads of complete files via HTTP. You could build a small app that took incoming Pub/Sub messages and uploading them as separate GCS objects or batch them into groups of messages and upload those to GCS, but there's no such built-in functionality.
Can I ask you more about your use case? What are you trying to do?

How to use Google Cloud Messaging from Google App Engine without consuming limited quotas?

I am developing a messaging app, using Google App Engine (GAE) and Google Cloud Messaging (GCM). GCM has no usage limits, but calling its API from my backend in GAE, uses the URLFetch API, which has a daily limit of 172,800,000 calls. I like thinking big: If I had 200 million users, not all of them would be able to send just one message.
I have tried using Apache HttpClient instead of the GCM provided sender class, but it uses sockets internally, consuming the Google API Sockets instead, which has a daily limit of 663,552,000. My imaginary 200 million users could just send 3 messages each...
So, is there any way to call the GCM API from GAE that don't consume any hard capped quota?
Thanks in advance.

Google Cloud Storage Budget Limit

Does Google Cloud Storage allow setting a monthly budget limit, similar to the one available for Google App Engine?
Google Cloud Storage does not implement usage limits on the XML API or for HTTP GETs of public objects.
It is possible to enable access logs: https://developers.google.com/storage/docs/accesslogs
This would give you detailed logs of all access to your objects. You could monitor the logs, and if the usage is higher than you want to allow, change the ACL on your objects to disable further access.