Class MultiConsumerPulsarSource<T>
java.lang.Object
org.apache.pulsar.functions.source.PulsarSource<T>
org.apache.pulsar.functions.source.PushPulsarSource<T>
org.apache.pulsar.functions.source.MultiConsumerPulsarSource<T>
- All Implemented Interfaces:
Serializable,AutoCloseable,org.apache.pulsar.client.api.MessageListener<T>,org.apache.pulsar.io.core.Source<T>
public class MultiConsumerPulsarSource<T>
extends PushPulsarSource<T>
implements org.apache.pulsar.client.api.MessageListener<T>
- See Also:
-
Field Summary
Fields inherited from class org.apache.pulsar.functions.source.PulsarSource
properties, pulsarClient, topicSchema -
Constructor Summary
ConstructorsConstructorDescriptionMultiConsumerPulsarSource(org.apache.pulsar.client.api.PulsarClient pulsarClient, MultiConsumerPulsarSourceConfig pulsarSourceConfig, Map<String, String> properties, ClassLoader functionClassLoader) -
Method Summary
Methods inherited from class org.apache.pulsar.functions.source.PushPulsarSource
consume, getQueueLength, readMethods inherited from class org.apache.pulsar.functions.source.PulsarSource
buildPulsarSourceConsumerConfig, buildRecord, createConsumeBuilderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.client.api.MessageListener
reachedEndOfTopic
-
Constructor Details
-
MultiConsumerPulsarSource
public MultiConsumerPulsarSource(org.apache.pulsar.client.api.PulsarClient pulsarClient, MultiConsumerPulsarSourceConfig pulsarSourceConfig, Map<String, String> properties, ClassLoader functionClassLoader)
-
-
Method Details
-
open
public void open(Map<String, Object> config, org.apache.pulsar.io.core.SourceContext sourceContext) throws ExceptionDescription copied from class:PushPulsarSourceOpen connector with configuration.- Specified by:
openin interfaceorg.apache.pulsar.io.core.Source<T>- Specified by:
openin classPushPulsarSource<T>- Parameters:
config- initialization configsourceContext- environment where the source connector is running- Throws:
Exception- IO type exceptions when opening a connector
-
received
public void received(org.apache.pulsar.client.api.Consumer<T> consumer, org.apache.pulsar.client.api.Message<T> message) - Specified by:
receivedin interfaceorg.apache.pulsar.client.api.MessageListener<T>
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getInputConsumers
- Specified by:
getInputConsumersin classPulsarSource<T>
-