graphql-google-pubsub
graphql-google-pubsub copied to clipboard
Possible bug in pubsub.asyncIterator()
[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.
We should consider to make the code more resilient here.
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?