Publish timeout

954 views
Skip to first unread message

Rageeth Sivasankaran

unread,
May 20, 2016, 10:30:09 AM5/20/16
to Google Cloud Pub/Sub Discussions
hi guys,

i am connecting to google pubsub from our on-premise application. i am trying to publish a message to a topic and there is another team/application that pulls the message. so my use case here is , publish the message to the topic with the least latency possible... normally i am seeing that the publish takes around 700 to 1600 ms... i want it to complete within 100ms..
 so it set the request timeout in RetryHttpInitializerWrapper as

request.setReadTimeout(2 * fiftymilliseconds);

i am getting an sockettimeoutException, but still i get messageId back....  so what is the purpose of the readTimeout value...

Alex Mordkovich

unread,
May 20, 2016, 12:39:09 PM5/20/16
to Rageeth Sivasankaran, Google Cloud Pub/Sub Discussions
Hi Rageeth,

700-1600ms does seem quite high for Publish response latency. Are you using version v1 of the API? Our records indicate a much lower average response time (from the server's perspective, across all users). You might be having network issues on your end. Also, note that the subscriber may receive the message before Pub/Sub responds to the Publish request. If you get an exception I don't think you can trust the data in the response. I'm assuming you're using the Google API Client Library for Java; if so, see https://developers.google.com/api-client-library/java/google-api-java-client/errors for more info on timeouts.

- Alex

--
You received this message because you are subscribed to the Google Groups "Google Cloud Pub/Sub Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-pubsub-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/a5a86ba7-229a-4454-a0bc-32e6ea892cf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages