Not receiving all messages
See original GitHub issue- OS: Google Container Engine (Kubernetes)
- Node.js version: gcr.io/google_appengine/nodejs
- npm version:
- @google-cloud/pubsub version: 0.16.2
I have a very simple subscription on a topic that runs in Container Engine. The code is the same as your examples:
const pubsub = require('@google-cloud/pubsub')();
const projectId = process.env.GOOGLE_CLOUD_PROJECT;
const topic = pubsub.topic('projects/' + projectId + '/topics/security-logs');
const subscription = topic.subscription('projects/' + projectId + '/subscriptions/securitySubscription');
subscription.on('error', function (err) {
"use strict";
console.error("Subscription error: " + err);
});
function onMessage(message) {
"use strict";
// Called every time a message is received.
logger.log("Subscription message received: " + JSON.stringify(message));
const data = 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.
Any idea what might be wrong ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Fix problems sending, receiving or connecting to Messages
Fix problems sending or receiving messages from specific contacts · Delete the contact and add it again. · Check if you blocked them....
Read more >How to Fix It When You're Not Receiving Texts on Android
How to Fix Androids Not Receiving Texts · Check for blocked numbers. · Check the network connection. · Disable Airplane mode. · Reboot...
Read more >Not receiving text on your phone: Here's how to fix - India Today
Steps to follow when Android is not receiving text messages: · Reboot your phone · Check the reception · Clear the cache from...
Read more >Why Am I Not Receiving Text Messages on My iPhone?
1. Start the Settings app. · 2. Tap "Messages," then tap "Send & Receive." · 3. In the "You can receive iMessages" section,...
Read more >If you can't send or receive messages on your iPhone or iPad
with an alert that says Not Delivered, follow these steps: ... You can set up Messages so that it automatically tries to send...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@callmehiphop That seems to have fixed it! Thanks!
@sharif9876 awesome, thanks for stopping by and letting us know!