public class SharedPulsarClient extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static SharedPulsarClient |
get(String componentId,
String serviceUrl,
ClientConfiguration clientConf)
Provides a shared pulsar client that is shared across all different tasks in the same component.
|
PulsarClient |
getClient() |
Consumer |
getSharedConsumer(String topic,
String subscription,
ConsumerConfiguration consumerConf) |
Producer |
getSharedProducer(String topic,
ProducerConfiguration producerConf) |
public static SharedPulsarClient get(String componentId, String serviceUrl, ClientConfiguration clientConf) throws PulsarClientException
componentId - the id of the spout/boltserviceUrl - clientConf - PulsarClientExceptionpublic PulsarClient getClient()
public Consumer getSharedConsumer(String topic, String subscription, ConsumerConfiguration consumerConf) throws PulsarClientException
PulsarClientExceptionpublic Producer getSharedProducer(String topic, ProducerConfiguration producerConf) throws PulsarClientException
PulsarClientExceptionpublic void close()
throws PulsarClientException
PulsarClientExceptionCopyright © 2017 Apache Software Foundation. All rights reserved.