New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pubsub: Unable to publish message from GAE Standard #702
Comments
/cc @zombiezen @broady |
As per https://cloud.google.com/pubsub/docs/reference/libraries (first paragraph), we recommend using the older client library at That said, publishing using this client should (mostly) work, as long as the Client is request-scoped. Pull subscribing will probably not (especially synchronously in the same request), as the client is intended to be running as a long-running connection over the process, which App Engine Standard fundamentally doesn't support. You can instead use push subscriptions. |
I'll look into the older client to see if I can use that to workaround the issue. In my example repository, the client is request-scoped and I tried to simplify the example as much as possible (only publishing a singular small message to an existing topic). |
Hi @d2g, for publishing, you can try this code: https://gist.github.com/broady/c79a65cb49d7b6a56448b3345a23b3d6 |
@broady Thanks that works great. Is the intention to update the documentation to reflect that GAE standard only supports v1 (not that it's just recommended) or get the later client to provide some/minimal support? |
I think the current documentation is OK, but making the client better support GAE standard would also be good. That's up to @jba. |
Given the increased weight of |
I think it's worth updating the documentation here that states that |
The pubsub library is unsupported on GAE standard: googleapis/google-cloud-go#702 Maybe I should try Python...
Use google.golang.org/api/pubsub/v1 to publish Cloud PubSub topic. See googleapis/google-cloud-go#702
Using GAE standard environment I am unable to publish messages.
I created the following Repository (https://github.com/d2g/dg-pubsubtest) to demonstrate the issue and also tried utilising task queues to extend the timeout. In either case it hangs awaiting the
get(ctx)
response.If I run this on the development server I get the following:
Unsolicited response received on idle HTTP channel starting with "HTTP/1.1 408 Request Timeout\r\nContent-Length: 0\r\nContent-Type: text/plain\r\n\r\n"; err=
Followed By
ERROR: context expired before API call remote_socket/Resolve completed
If I remove the
get(ctx)
the requests completes on the with a 200 but no message is delivered to the topic.I apologise in advance if this is my issue, I did try the google-appengine-go forum first.
The text was updated successfully, but these errors were encountered: