<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
GoogleCredential credential = GoogleCredential.getApplicationDefault();
if (credential.createScopedRequired()) {
credential = credential.createScoped(PubsubScopes.all());
}
HttpRequestInitializer initializer =
new RetryHttpInitializerWrapper(credential);
return new Pubsub.Builder(httpTransport, jsonFactory, initializer)
.setApplicationName(APPLICATION_NAME)
.build();
PushConfig pushConfig = new PushConfig()
.setPushEndpoint(PubsubUtils.getAppEndpointUrl());
Pubsub client = PubsubUtils.getClient();
...
client.projects().topics()
.publish(fullTopicName, publishRequest)
.execute();
After some more investigation, I managed to receive pushed messages by changing "/_ah/push-handlers/receive_message" to something a different servlet path which does not include "/_ah/push-handlers/"However the push messages are too slow to reach the client, average of 200 seconds from push to receive, seem most of the time is wasted in the network, whereas the sending and processing parts are fast.
--
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-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/ee621be3-59d0-4363-bd8d-1bffab1fd5bc%40googlegroups.com.
I tried deploying multiple times using different topics/subscriptions still getting the same average times.
Is there a way to debug the network part from app engine? So I can get more info, share it?
--
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-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/bc9566dc-25d4-4ed7-ab44-c2d21331535c%40googlegroups.com.
Subscription subscription = new Subscription().setTopic(PubSubUtils.getFullTopicName()).setAckDeadlineSeconds(ACKNOWLEDGE_TIME);
if (subType == SubscriptionType.PUSH) { PushConfig pushConfig = new PushConfig().setPushEndpoint(PubSubUtils.getEndpointUrlForSubscription()); subscription.setPushConfig(pushConfig); } subscriptions.create(PubSubUtils.getFullSubscriptionName(), subscription).execute();}
Subscriptions subscriptions = client.projects().subscriptions();ModifyPushConfigRequest request = new ModifyPushConfigRequest();PushConfig pushConfig = new PushConfig().setPushEndpoint(PubSubUtils.getEndpointUrlForSubscription());request.setPushConfig(pushConfig);subscriptions.modifyPushConfig(PubSubUtils.getFullSubscriptionName(), request).execute();
--
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-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/e5aa2587-f8eb-486d-841f-13f6a2ffdfcf%40googlegroups.com.
I definitely sent multiple subsequent messages with the same 150-200 seconds average on multiple versions. So it is not related to the first message sent.However, I did not test sending messages in the order of 1000s, it seemed redundant.
--
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-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/8ae22449-c5a0-4ffd-b684-330dbce6f57e%40googlegroups.com.
--
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/7f888370-093b-4408-ae27-7d089d3e6d07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jawad, thanks for persisting! To decide whether this is a bug, let's understand your use case better. Do you anticipate having to switch between pull and push frequently? Could you tell me more about what makes that necessary?
In general, we try to minimize any particular guarantee on message latency to optimize the service for throughput and latency under different conditions. Switches between subscription types -- in the cases known to us -- are a rare event that's dramatic enough for extra message latency to not be a concern. We, of course, fully expect the latency to recover and stabilize after the switch. That this is a rare occurrence may be a bad assumption, so please let me know.
k
--
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/384c4ccf-df01-4953-83b1-c93c47b8aba9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-pubsub-discuss/b3329aef-c9b9-464a-95eb-5594192e3b41%40googlegroups.com.
--
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/e58615a4-585b-4b0f-b8c3-616e93a71717%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.