graphql-google-pubsub icon indicating copy to clipboard operation
graphql-google-pubsub copied to clipboard

Possible bug in pubsub.asyncIterator()

Open stevesuh opened this issue 6 years ago • 2 comments

[Node] uncaughtException Error: Failed to create subchannel
[Node]     at Immediate.onConnectionStatus (/Users/ssuh/axio/insurance-storage/node_modules/@google-cloud/pubsub/src/connection-pool.js:293:21)
[Node]     at runCallback (timers.js:697:11)
[Node]     at tryOnImmediate (timers.js:667:5)
[Node]     at processImmediate (timers.js:649:5)

I was logging this line. https://github.com/axelspringer/graphql-google-pubsub/blob/master/src/google-pubsub.ts#L81

I saw one message go through from the async iterator but then the it blew up on second one. So there should at least be a try catch.

stevesuh avatar Oct 03 '18 17:10 stevesuh

We should consider to make the code more resilient here.

TimSusa avatar May 20 '19 08:05 TimSusa

Another possible problem could be here, that the message is acked before handleMessage. Is that really the way to go, or should ack better be called after handleMessage?

TimSusa avatar May 22 '19 15:05 TimSusa