GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pubsub will throw during Subscription.pull when autoAck is on and no messages avail · Issue #455 · googleapis/google-cloud-node Closed Labels 🚨This issue needs some love.api: pubsubIssues related to the Pub/Sub API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. Milestone DescriptionI'm porting to v1beta2 of the pubsub service. In recent versions of gcloud-node, my previous code will abort in Subscription.pull with: I use autoAck and right now there are very few messages on the topic. So I think what's happening is the long-poll completes without receiving a message, and this block in Subscription.pull: this.makeReq_('POST', path, null, body, function(err, response) { if (err) { callback(err); return; } var messages = response.receivedMessages || []; messages = messages.map(Subscription.formatMessage_); if (self.autoAck) { var ackIds = messages.map(function(message) { return message.ackId; }); self.ack(ackIds, function(err) { callback(err, messages); }); calls self.ack with ackIds empty because receivedMessages is empty. I fixed this in my local copy with: since there's no point in trying to ack if there are no messages. If I had a bit more time right now, I'd offer a PR with a test, but let's get an issue opened at least to see if the problem has been characterized correctly first. Activity
MetadataMetadataAssigneesLabels🚨This issue needs some love.api: pubsubIssues related to the Pub/Sub API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |