Class StreamConsumerRegistrar
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kinesis.internals.publisher.fanout.StreamConsumerRegistrar
-
@Internal public class StreamConsumerRegistrar extends Object
Responsible for registering and deregistering EFO stream consumers. Will block until consumers are ready.
-
-
Constructor Summary
Constructors Constructor Description StreamConsumerRegistrar(KinesisProxySyncV2Interface kinesisProxyV2Interface, FanOutRecordPublisherConfiguration configuration, FullJitterBackoff backoff)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Destroy any open resources used by the factory.voidderegisterStreamConsumer(String stream)Deregister the stream consumer with the given ARN.StringregisterStreamConsumer(String stream, String streamConsumerName)Register a stream consumer with the given name against the given stream.
-
-
-
Constructor Detail
-
StreamConsumerRegistrar
public StreamConsumerRegistrar(KinesisProxySyncV2Interface kinesisProxyV2Interface, FanOutRecordPublisherConfiguration configuration, FullJitterBackoff backoff)
-
-
Method Detail
-
registerStreamConsumer
public String registerStreamConsumer(String stream, String streamConsumerName) throws Exception
Register a stream consumer with the given name against the given stream. Blocks until the consumer becomes active. If the stream consumer already exists, the ARN is returned.- Parameters:
stream- the stream to register the stream consumer againststreamConsumerName- the name of the new stream consumer- Returns:
- the stream consumer ARN
- Throws:
ExecutionExceptionInterruptedExceptionException
-
deregisterStreamConsumer
public void deregisterStreamConsumer(String stream) throws Exception
Deregister the stream consumer with the given ARN. Blocks until the consumer is deleted.- Parameters:
stream- the stream in which to deregister the consumer- Throws:
ExecutionExceptionInterruptedExceptionException
-
close
public void close()
Destroy any open resources used by the factory.
-
-