Pushing 400k messages creates 10m messages to pubsub
See original GitHub issueI tried to push avro file contents to pubsub (1 record/message). The file had 429 077 records but after the push pubsub graph showed about 10 million messages. Also logged the publish calls and it was called the correct amount of times (429 077). Code is below and it’s highland stream wrapped to promise.
export const avroInBucketToPubSub: AvroInBucketToPubSub = ({
exportFile,
inputTopicName,
validator
}) => {
const pubsub = new PubSub();
return new Promise((resolve): void => {
const inputTopic = pubsub.topic(inputTopicName);
hl(exportFile.createReadStream().pipe(new streams.BlockDecoder()))
.filter(row => validator.isValid(row))
.map(JSON.stringify)
.map(Buffer.from)
.each(buff => inputTopic.publish(buff))
.done(resolve);
});
};
Environment details
- OS:
- Node.js version: v10
- npm version: 6.11.3
@google-cloud/pubsub
version: 0.30.1
Steps to reproduce
- push over 100k messages without waiting reply
Making sure to follow these steps will guarantee the quickest resolution possible.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:38 (3 by maintainers)
Top Results From Across the Web
Push subscriptions | Cloud Pub/Sub Documentation
In push delivery, Pub/Sub initiates requests to your subscriber application to deliver messages. Key Point: Understand the properties of a push subscription ...
Read more >pubsub - Go Packages
Package pubsub provides an easy way to publish and receive Google Cloud Pub/Sub messages, hiding the details of the underlying server RPCs.
Read more >Google Cloud Pub/Sub - Asynchronous Messaging
Pub/Sub accepts a maximum of 1,000 messages in a batch, and the size of a batch can not exceed 10 megabytes. Pub/Sub Core...
Read more >Unable to receive pushed massages using pubsub
However the push messages are too slow to reach the client, average of 200 seconds from push to receive, seem most of the...
Read more >Google Cloud PubSub Operators - Apache Airflow
The PubSub topic is a named resource to which messages are sent by publishers. The PubSubCreateTopicOperator operator creates a topic. tests/system/providers/ ...
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
fair, that should be fixed when publisher flow control is implemented as per above discussion
So there is no such thing as publisher-side flow control for cloud that would help the user here. We are in the process of adding publisher flow control to our client libraries and I think there is still outstanding work on node for this. I think that’s the next step to take here.