Hello,

I have a GKE cluster with three nodes, which are being subscribers to the 
same PubSub subscription 
and polling continuously for new messages.  
I am using the Asynchronous Pull mechanism for my subscribers. These are 
running in a NodeJS Express application.

subscription.on("message", message => messageHandler(message));

async function messageHandler(message) {
  try {
    await doSomeProcessing();
    message.ack();
  } catch (error) {
    if (error instanceof DuplicateRowError) {
      message.ack();
    } else {
      console.log(`Message ${message.id} was not acknowledged. Waiting to 
be sent again.`);
    }
  }
}

Things go well most of the time, but from time to time the subscribers stop 
receiving messages. Redeploying the application doesn't help and they 
recover by themselves after aprox 30min- 1 hour, when the pending 
messages are being sent. The quota has not been exceeded and 
subscription.on("error", 
error ..) does not get triggered, the StackDriver logs also don't show any 
errors.

Any idea what might cause this pb?

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/e70e52c7-685c-45f9-92b8-585b10fff85b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to