google-cloud-java icon indicating copy to clipboard operation
google-cloud-java copied to clipboard

Create new efficient batching implementation for Pub/Sub and Logging

Open garrettjonesgoogle opened this issue 8 years ago • 6 comments

Try to support BigTable too.

  • [x] Bigtable
  • [ ] Pub/Sub
  • [ ] Logging

garrettjonesgoogle avatar Mar 06 '18 19:03 garrettjonesgoogle

This is in progress for Cloud Bigtable: https://github.com/googleapis/gax-java/pulls?utf8=%E2%9C%93&q=is%3Apr+batcher

This will land eventually.

sduskis avatar Jun 12 '19 11:06 sduskis

Does this new API will include ability to publish list of messages? Like fun publish(messages: List<PubsubMessage>): ApiFuture<List<String>>

IRus avatar Sep 13 '19 14:09 IRus

@IRus Sorry for the late response. As of now, we have yet to implement this feature on google-cloud-pubsub.

The surface for that is not yet finalized but it would support something similar to Batcher<PubsubMessage, String>, then one can perform batching with this batcher.

rahulKQL avatar Sep 20 '19 12:09 rahulKQL

What would be the difference with the current BatchSettings available on the Publisher's builder ? i.e:

Publisher
      .newBuilder(topic)
      .setBatchingSettings(
        BatchingSettings.newBuilder.
          setFlowControlSettings(...)
          .setElementCountThreshold(...)
          .setRequestByteThreshold(...)
          .setDelayThreshold(...)
          .build
    )

where you can specify an elementCountThreshold, requestByteThreshold etc ?

jmouvill avatar Oct 11 '19 08:10 jmouvill

@jmouvill This feature has been little delayed for Pubsub, but I would say BatchingSettings configurations would be similarly respected in new batching impl. We are planning to use the same BatchingSettings to set thresholds for Batcherinstance.

rahulKQL avatar Oct 11 '19 08:10 rahulKQL

This issue has been split into the 2 linked tracking issues to implement in the logging and pubsub clients respectively.

chingor13 avatar Jan 07 '20 20:01 chingor13