Modifier and Type | Method and Description |
---|---|
Publisher |
build() |
Publisher.Builder |
setBatchingSettings(BatchingSettings batchingSettings) |
Publisher.Builder |
setChannelProvider(TransportChannelProvider channelProvider)
ChannelProvider to use to create Channels, which must point at Cloud Pub/Sub
endpoint. |
Publisher.Builder |
setCredentialsProvider(CredentialsProvider credentialsProvider)
CredentialsProvider to use to create Credentials to authenticate calls. |
Publisher.Builder |
setExecutorProvider(ExecutorProvider executorProvider)
Gives the ability to set a custom executor to be used by the library.
|
Publisher.Builder |
setHeaderProvider(HeaderProvider headerProvider)
Sets the static header provider.
|
Publisher.Builder |
setRetrySettings(RetrySettings retrySettings)
Configures the Publisher's retry parameters.
|
Publisher.Builder |
setTransform(ApiFunction<com.google.pubsub.v1.PubsubMessage,com.google.pubsub.v1.PubsubMessage> messageTransform)
Gives the ability to set an
ApiFunction that will transform the PubsubMessage
before it is sent |
public Publisher.Builder setChannelProvider(TransportChannelProvider channelProvider)
ChannelProvider
to use to create Channels, which must point at Cloud Pub/Sub
endpoint.
For performance, this client benefits from having multiple underlying connections. See
InstantiatingGrpcChannelProvider.Builder.setPoolSize(int)
.
@BetaApi public Publisher.Builder setHeaderProvider(HeaderProvider headerProvider)
headerProvider
- the header providerpublic Publisher.Builder setCredentialsProvider(CredentialsProvider credentialsProvider)
CredentialsProvider
to use to create Credentials to authenticate calls.public Publisher.Builder setBatchingSettings(BatchingSettings batchingSettings)
public Publisher.Builder setRetrySettings(RetrySettings retrySettings)
public Publisher.Builder setExecutorProvider(ExecutorProvider executorProvider)
@BetaApi public Publisher.Builder setTransform(ApiFunction<com.google.pubsub.v1.PubsubMessage,com.google.pubsub.v1.PubsubMessage> messageTransform)
ApiFunction
that will transform the PubsubMessage
before it is sentpublic Publisher build() throws IOException
IOException
Copyright © 2019 Google LLC. All rights reserved.