Class PubSubSubscriberFactoryForEmulator
- java.lang.Object
-
- org.apache.flink.streaming.connectors.gcp.pubsub.emulator.PubSubSubscriberFactoryForEmulator
-
- All Implemented Interfaces:
Serializable,PubSubSubscriberFactory
public class PubSubSubscriberFactoryForEmulator extends Object implements PubSubSubscriberFactory
A convenience PubSubSubscriberFactory that can be used to connect to a PubSub emulator. The PubSub emulators do not support SSL or Credentials and as such this SubscriberStub does not require or provide this.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PubSubSubscriberFactoryForEmulator(String hostAndPort, String project, String subscription, int retries, java.time.Duration timeout, int maxMessagesPerPull)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PubSubSubscribergetSubscriber(com.google.auth.Credentials credentials)Creates a new SubscriberStub using the EventLoopGroup and credentials.
-
-
-
Method Detail
-
getSubscriber
public PubSubSubscriber getSubscriber(com.google.auth.Credentials credentials) throws IOException
Description copied from interface:PubSubSubscriberFactoryCreates a new SubscriberStub using the EventLoopGroup and credentials. If the SubscriberStub uses a EventLoopGroup, as many Grpc classes do, this EventLoopGroup should be used.- Specified by:
getSubscriberin interfacePubSubSubscriberFactory- Throws:
IOException
-
-