Skip to content
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

Pub/Sub subscription push endpoint #1744

Closed
arbesfeld opened this issue Oct 23, 2016 · 4 comments
Closed

Pub/Sub subscription push endpoint #1744

arbesfeld opened this issue Oct 23, 2016 · 4 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API.

Comments

@arbesfeld
Copy link
Contributor

Any consideration to have this API implemented?

gcloud alpha pubsub topics create [your-topic-name]
gcloud alpha pubsub subscriptions create [your-subscription-name] \
--topic [your-topic-name] \
--push-endpoint \
https://[your-app-id].appspot.com/pubsub/push?token=[your-token] \
--ack-deadline 30
@jgeewax
Copy link
Contributor

jgeewax commented Oct 24, 2016

Hm - seems like you can't set a push-endpoint for a subscription (at least according to our docs: https://googlecloudplatform.github.io/google-cloud-node/#/docs/google-cloud/0.43.0/pubsub/topic?method=subscribe)

We should probably allow this even though it wouldn't be a typical subscription you can listen on (since the requests will be going to the endpoint required)

@jgeewax jgeewax added api: pubsub Issues related to the Pub/Sub API. enhancement labels Oct 24, 2016
@stephenplusplus
Copy link
Contributor

Yes, this is a case of poor docs on our part. You can indeed get the push endpoint through:

var topic = pubsub.topic('[your-topic-name]')

topic.subscribe('[your-subscription-name]', {
  ackDeadlineSeconds: 30,
  pushConfig: {
    pushEndpoint: 'https://[your-app-id].appspot.com/pubsub/push?token=[your-token]'
  }
}, function (err, subscription) {})

Please let me know if that works!

@arbesfeld
Copy link
Contributor Author

This works - thanks :)

@prgtsrivastava
Copy link

I have a requirement of one topic and many push subscription.
Do every Subscriber have their own end points?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API.
Projects
None yet
Development

No branches or pull requests

4 participants