Class PublisherBuilder (1.14.1)

public abstract class PublisherBuilder

A builder for a PubSub Lite Publisher. Basic usage:


 Publisher<Offset> publisher = PublisherBuilder.builder()
   .setTopic(
     TopicPath.newBuilder()
       .setProject(MY_PROJECT)
       .setName(MY_TOPIC)
       .setLocation(CloudZone.of("us-east1-a"))
       .build())
  .setPartition(Partition.of(10))
  .build();
 

A custom service client can also be set.

Inheritance

java.lang.Object > PublisherBuilder

Static Fields

DISABLED_BATCHING_SETTINGS

public static final BatchingSettings DISABLED_BATCHING_SETTINGS
Field Value
Type Description
BatchingSettings

Static Methods

builder()

public static PublisherBuilder.Builder builder()
Returns
Type Description
PublisherBuilder.Builder

Constructors

PublisherBuilder()

public PublisherBuilder()