public class MultiConsumerPulsarSource<T> extends PushPulsarSource<T> implements org.apache.pulsar.client.api.MessageListener<T>
properties, pulsarClient, topicSchema| Constructor and Description |
|---|
MultiConsumerPulsarSource(org.apache.pulsar.client.api.PulsarClient pulsarClient,
MultiConsumerPulsarSourceConfig pulsarSourceConfig,
Map<String,String> properties,
ClassLoader functionClassLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
List<org.apache.pulsar.client.api.Consumer<T>> |
getInputConsumers() |
void |
open(Map<String,Object> config,
SourceContext sourceContext)
Open connector with configuration.
|
void |
received(org.apache.pulsar.client.api.Consumer<T> consumer,
org.apache.pulsar.client.api.Message<T> message) |
consume, getQueueLength, readbuildPulsarSourceConsumerConfig, buildRecord, createConsumeBuilderpublic MultiConsumerPulsarSource(org.apache.pulsar.client.api.PulsarClient pulsarClient,
MultiConsumerPulsarSourceConfig pulsarSourceConfig,
Map<String,String> properties,
ClassLoader functionClassLoader)
public void open(Map<String,Object> config, SourceContext sourceContext) throws Exception
PushPulsarSourcepublic void received(org.apache.pulsar.client.api.Consumer<T> consumer, org.apache.pulsar.client.api.Message<T> message)
received in interface org.apache.pulsar.client.api.MessageListener<T>public void close()
throws Exception
close in interface AutoCloseableExceptionpublic List<org.apache.pulsar.client.api.Consumer<T>> getInputConsumers()
getInputConsumers in class PulsarSource<T>Copyright © 2017–2021 Apache Software Foundation. All rights reserved.