Skip to content

Commit a79b2a3

Browse files
fix: Add default batching in producer settings (#96)
1 parent a4f012b commit a79b2a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/google/cloud/pubsublite/kafka/ProducerSettings.java

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.cloud.pubsublite.kafka;
1818

19+
import static com.google.cloud.pubsublite.cloudpubsub.PublisherSettings.DEFAULT_BATCHING_SETTINGS;
1920
import static com.google.cloud.pubsublite.internal.ExtractStatus.toCanonical;
2021

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

0 commit comments

Comments
 (0)