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

[PubSub] subscription.ack(message.id, callback) returns 500 #1234

Closed
atinylittleshell opened this issue Apr 15, 2016 · 6 comments
Closed

[PubSub] subscription.ack(message.id, callback) returns 500 #1234

atinylittleshell opened this issue Apr 15, 2016 · 6 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. type: question Request for information or clarification. Not an issue.

Comments

@atinylittleshell
Copy link

atinylittleshell commented Apr 15, 2016

a super simple nodejs script, but I just can't acknowledge the message I pulled. anything I'm doing wrong here?

mySubscription.on('message', function (message) {
  console.log('GOT MESSAGE: ' + message.id) // this shows an integer-like value
  mySubscription.ack(message.id, (err, apiResponse) => {
    // err would be a 500 response here
  })
})
@stephenplusplus
Copy link
Contributor

I can't seem to reproduce. Is there any more info in the error?

Something else to try would be message.ack().

@stephenplusplus stephenplusplus added the api: pubsub Issues related to the Pub/Sub API. label Apr 15, 2016
@atinylittleshell
Copy link
Author

unfortunately there was no more information in the error.. the message was just saying it's internal error and an error code 500.

i can definitely have a try with message.ack this evening. does it help if I share the subscription where I was hitting the error?

@stephenplusplus
Copy link
Contributor

Yeah, it probably couldn't hurt. Thanks!

// cc @tmatsuo

@atinylittleshell
Copy link
Author

Sent details to your gmail. :)

@atinylittleshell
Copy link
Author

i figured out.. message.ackId is what we should use. message.id cannot be used in ack().
this should probably be better clarified in the documentation, examples, and also error message.

@stephenplusplus
Copy link
Contributor

Woops, sorry that I didn't catch that. I'm going to be working on writing some better "overview"-style docs (as opposed to individual method docs), which will definitely cover this. However, if you have an idea to improve what we have already, it would be awesome to receive a pull request.

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. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants