Skip to content

Commit

Permalink
fix: Add default batching in producer settings (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpcollins-google committed Mar 3, 2021
1 parent a4f012b commit a79b2a3
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -16,6 +16,7 @@

package com.google.cloud.pubsublite.kafka;

import static com.google.cloud.pubsublite.cloudpubsub.PublisherSettings.DEFAULT_BATCHING_SETTINGS;
import static com.google.cloud.pubsublite.internal.ExtractStatus.toCanonical;

import com.google.api.gax.rpc.ApiException;
Expand Down Expand Up @@ -72,6 +73,7 @@ public Producer<byte[], byte[]> instantiate() throws ApiException {
PublisherServiceSettings.newBuilder()))))
.setTopic(topicPath())
.setPartition(partition)
.setBatchingSettings(DEFAULT_BATCHING_SETTINGS)
.build();
} catch (Throwable t) {
throw toCanonical(t).underlying;
Expand Down

0 comments on commit a79b2a3

Please sign in to comment.