Modifier and Type | Method and Description |
---|---|
Publisher |
build() |
Publisher.Builder |
setBatchingSettings(com.google.api.gax.batching.BatchingSettings batchingSettings) |
Publisher.Builder |
setChannelProvider(com.google.api.gax.rpc.TransportChannelProvider channelProvider)
ChannelProvider to use to create Channels, which must point at Cloud Pub/Sub
endpoint. |
Publisher.Builder |
setCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider)
CredentialsProvider to use to create Credentials to authenticate calls. |
Publisher.Builder |
setEnableMessageOrdering(boolean enableMessageOrdering)
Sets the message ordering option.
|
Publisher.Builder |
setEndpoint(String endpoint)
Gives the ability to override the gRPC endpoint.
|
Publisher.Builder |
setExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider)
Gives the ability to set a custom executor to be used by the library.
|
Publisher.Builder |
setHeaderProvider(com.google.api.gax.rpc.HeaderProvider headerProvider)
Sets the static header provider.
|
Publisher.Builder |
setRetrySettings(com.google.api.gax.retrying.RetrySettings retrySettings)
Configures the Publisher's retry parameters.
|
Publisher.Builder |
setTransform(com.google.api.core.ApiFunction<PubsubMessage,PubsubMessage> messageTransform)
Gives the ability to set an
ApiFunction that will transform the PubsubMessage
before it is sent |
public Publisher.Builder setChannelProvider(com.google.api.gax.rpc.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(com.google.api.gax.rpc.HeaderProvider headerProvider)
headerProvider
- the header providerpublic Publisher.Builder setCredentialsProvider(com.google.api.gax.core.CredentialsProvider credentialsProvider)
CredentialsProvider
to use to create Credentials to authenticate calls.public Publisher.Builder setBatchingSettings(com.google.api.gax.batching.BatchingSettings batchingSettings)
public Publisher.Builder setRetrySettings(com.google.api.gax.retrying.RetrySettings retrySettings)
@BetaApi(value="Ordering is not yet fully supported and requires special project enablements.") public Publisher.Builder setEnableMessageOrdering(boolean enableMessageOrdering)
public Publisher.Builder setExecutorProvider(com.google.api.gax.core.ExecutorProvider executorProvider)
@BetaApi public Publisher.Builder setTransform(com.google.api.core.ApiFunction<PubsubMessage,PubsubMessage> messageTransform)
ApiFunction
that will transform the PubsubMessage
before it is sentpublic Publisher.Builder setEndpoint(String endpoint)
public Publisher build() throws IOException
IOException
Copyright © 2019 Google LLC. All rights reserved.