Closed leee0n closed 3 years ago
Try setting spring.cloud.gcp.pubsub.publisher.batching.request-byte-threshold
to a reasonable number -- by default, the client library sets it at only 1 byte, which effectively turns off batching.
I'll update the documentation to reflect this correctly.
Works flawlessly @elefeint , thanks a lot!
Been recently trying to add the batching features available for GCP PubSub and so far I can't see any change in the behavior. As soon as the message gets into the service it goes out to the PubSub immediately without waiting for the conditions to be satisfied (5 elements processed or time spent higher than delay threshold after first processed message).
Just added the following to my application.properties file.
My existing properties are as follows.
Is it possible that I'm missing something? Do I require any extra properties?
Also, do the properties help to change the output type to a List<?> instead of a single object instead? Or that would be a task for the developer to code it within the service itself?