You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
I have a very simple subscription on a topic that runs in Container Engine. The code is the same as your examples:
constpubsub=require('@google-cloud/pubsub')();constprojectId=process.env.GOOGLE_CLOUD_PROJECT;consttopic=pubsub.topic('projects/'+projectId+'/topics/security-logs');constsubscription=topic.subscription('projects/'+projectId+'/subscriptions/securitySubscription');subscription.on('error',function(err){"use strict";console.error("Subscription error: "+err);});functiononMessage(message){"use strict";// Called every time a message is received.logger.log("Subscription message received: "+JSON.stringify(message));constdata=Buffer.from(message.data).toString('utf-8');logger.log("message.data: "+data);message.ack();}subscription.on('message',onMessage);
The problem is that not all messages are received. I would say a little more than 50% are.
I see in my logs that messages are successfully sent by publishers (I get messageIds) but the subscription does not get them all. I have only one subscriber.
I have a very simple subscription on a topic that runs in Container Engine. The code is the same as your examples:
The problem is that not all messages are received. I would say a little more than 50% are.
I see in my logs that messages are successfully sent by publishers (I get messageIds) but the subscription does not get them all. I have only one subscriber.
Any idea what might be wrong ?