Interface PubsubClient.PubsubClientFactory
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
PubsubTestClient.PubsubTestClientFactory
- Enclosing class:
PubsubClient
Factory for creating clients.
-
Method Details
-
newClient
PubsubClient newClient(@Nullable String timestampAttribute, @Nullable String idAttribute, PubsubOptions options, @Nullable String rootUrlOverride) throws IOException Construct a new Pubsub client. It should be closed viaCloseable.close()
in order to ensure tidy cleanup of underlying netty resources (or use the try-with-resources construct). Usesoptions
to derive pubsub endpoints and application credentials. If non-null, usetimestampAttribute
andidAttribute
to store custom timestamps/ids within message metadata.- Throws:
IOException
-
newClient
PubsubClient newClient(@Nullable String timestampAttribute, @Nullable String idAttribute, PubsubOptions options) throws IOException - Throws:
IOException
-
getKind
String getKind()Return the display name for this factory. Eg "Json", "gRPC".
-