google-cloud-pubsub

Google Cloud PubSub: Previously valid subscription suddenly unauthorized

那年仲夏 提交于 2019-12-05 10:51:10
I'm having some trouble with the Google Cloud PubSub API. Recently, I started using Cloud PubSub to queue messages for a chat server I'm working on. Messages coming in from a PubSub subscription are forwarded to users using the socket.io node library. I have no problems getting this set up - I run my node.js server, open up a couple browser windows, and I can chat away without any problems. I've noticed, however, that often after the server has been running for a few hours, that it starts spitting out the following error: (node:2525) UnhandledPromiseRejectionWarning: Unhandled promise

How to verify ownership of Google Cloud Endpoints service URL?

孤者浪人 提交于 2019-12-05 07:26:18
I already set up Google Cloud Endpoints project and can invoke http/https requests. Endpoints gives me MY_API.endpoints.MY_PROJECT.cloud.goog domain name that I can use. I'm using gRPC Cloud Endpoints with HTTP/JSON to gRPC transcoding feature. It is deployed on Google Kubernetes Engine (deployment yaml script attached at the end). When I'm trying to create push subscription with that URL I getting next error: "The supplied HTTP URL is not registered in the subscription's parent project (url="https://MY_API.endpoints.MY_PROJECT.cloud.goog/v1/path", project_id="PROJECT_ID"). My gcloud call:

Authenticating PubSub Push messages in AppEngine

旧街凉风 提交于 2019-12-05 06:45:26
问题 Is there a way to know for sure that a message received by app engine is from the Google PubSub service? Currently the PubSub service gets a 302 on the URLs configured as "login: admin" in appengine app.yaml. So it keeps retrying. I would have expected this to behave like the Tasks in Appengine and automatically authenticate to "login:admin" URLs. 回答1: The FAQ recommends that when setting up your PubSub push subscription you put a shared secret token as a request parameter which you check for

Google Pub/Sub push message not working for IAP enabled app engine

╄→尐↘猪︶ㄣ 提交于 2019-12-04 21:23:44
I am testing out a very basic Pub/Sub subscription. I have the push endpoint set to an App I have deployed through a Python Flex service in App Engine. The service is in a project with Identity-Aware Proxy enabled. The IAP is configured to allow through users authenticated with our domain. I do not see any of the push requests being processed by my app. I turned off the IAP protection and then I see that the requests are processed. I turn it back on and they are no longer processed. Note: This answer uses BETA commands and features. To enable IAP enabled App Engine access to Pub/Sub push

Need Help creating GMAIL Pub/Sub Notification service to SpreadsheetApp (Google Appscript)

大憨熊 提交于 2019-12-04 15:12:23
I wish I didn't have to repost this question, but my boss pushed this one up to high priority, and I need help to sort this out. I'm trying to use a GAS script to pull pub/sub notifications from an address on my GSuite Domain (currently, I'm testing on mine). Basically, I'm trying to accomplish what is described in all this material: 1)Great Github Project from Spencer Easton (Instructional Video) 2) pubsub API for GMAIL 3) Notification Help 4) Real-time notifications 5)Endpoint documentation I have created the GAS project documented in reference 1 on my Work domain in Google Drive, published

Google Cloud Pubsub authentication error from App Engine

你。 提交于 2019-12-04 14:54:44
We're having trouble publishing messages to a Google Cloud PubSub topic on Google AppEngine. Using the Application Default credentials works perfect locally. But once it's deployed on Google AppEngine it gives the following error: <HttpError 403 when requesting https://pubsub.googleapis.com/v1/projects/our-project-id/topics/our-topic:publish?alt=json returned "The request cannot be identified with a project. Please pass a valid API key with the request."> I would assume that it's will use the service account of app engine to access the PubSub API. Here is the code we used to create the

Google-Cloud: Jetty ALPN/NPN has not been properly configured

痞子三分冷 提交于 2019-12-04 12:20:53
Getting exception whilst using Google Pubsub to list topics, my web application is running on tomcat. public static List<String> listTopics(GcpCredentials gcCredentials, String project) throws GCPException, IOException { List<String> topics = new ArrayList<>(); TopicAdminClient client = getTopicClient(gcCredentials); ProjectName projectName = ProjectName.create(project); ListTopicsPagedResponse response = client.listTopics(projectName); for (Topic topic :response.iterateAll()) { topics.add(topic.getNameAsTopicName().getTopic()); } return topics; }` Exception: java.lang.IllegalArgumentException

Streaming from Pub/Sub to BigQuery

微笑、不失礼 提交于 2019-12-04 08:02:53
I am trying to stream some data from google PubSub into BigQuery using a python dataflow. For testing purposes I have adapted the following code https://github.com/GoogleCloudPlatform/DataflowSDK-examples/blob/master/python/dataflow_examples/cookbook/bigquery_schema.py into a streaming pipeline by setting options.view_as(StandardOptions).streaming = True So then I changed the record_ids pipeline to read from Pub/Sub # ADDED THIS lines = p | 'Read PubSub' >> beam.io.ReadStringsFromPubSub(INPUT_TOPIC) | beam.WindowInto(window.FixedWindows(15)) # CHANGED THIS # record_ids = p | 'CreateIDs' >>

How scalable are Google Club Pub/Sub compared Object Change Notifications

牧云@^-^@ 提交于 2019-12-04 06:48:37
问题 As the title asks, how scalable is Google Club Pub/Sub compared to Object Change Notifications in Google Cloud Storage when using Signed URLs to upload objects? How do each compare in terms of being able to handle many objects being uploaded in a short period of time? Will delivery be slower if many objects are uploaded quickly? For example, 1000 objects/second? If neither are scalable what other options are there? For my purposes, I need to upload an image, then when a notification is

Google PubSub python client returning StatusCode.UNAVAILABLE

房东的猫 提交于 2019-12-04 06:08:14
I am trying to establish a long running Pull subscription to a Google Cloud PubSub topic. I am using a code very similar to the example given in the documentation here , i.e.: def receive_messages(project, subscription_name): """Receives messages from a pull subscription.""" subscriber = pubsub_v1.SubscriberClient() subscription_path = subscriber.subscription_path( project, subscription_name) def callback(message): print('Received message: {}'.format(message)) message.ack() subscriber.subscribe(subscription_path, callback=callback) # The subscriber is non-blocking, so we must keep the main