Class DefaultPulsarClientFactory
java.lang.Object
org.apache.pulsar.spring.core.DefaultPulsarClientFactory
- All Implemented Interfaces:
PulsarClientFactory, Aware, EnvironmentAware
public class DefaultPulsarClientFactory
extends Object
implements PulsarClientFactory, EnvironmentAware
Default implementation for
PulsarClientFactory.- Author:
- Soby Chacko, Chris Bono
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPulsarClientFactory(String serviceUrl) Construct a factory that creates clients using a default Pulsar client builder with no modifications other than the specified service url.Construct a factory that creates clients using a customized Pulsar client builder. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.pulsar.client.api.PulsarClientCreate a client.voidsetEnvironment(Environment environment)
-
Constructor Details
-
DefaultPulsarClientFactory
Construct a factory that creates clients using a default Pulsar client builder with no modifications other than the specified service url.- Parameters:
serviceUrl- the service url
-
DefaultPulsarClientFactory
Construct a factory that creates clients using a customized Pulsar client builder.- Parameters:
customizer- the customizer to apply to the builder
-
-
Method Details
-
createClient
public org.apache.pulsar.client.api.PulsarClient createClient()Description copied from interface:PulsarClientFactoryCreate a client.- Specified by:
createClientin interfacePulsarClientFactory- Returns:
- the created client instance
-
setEnvironment
- Specified by:
setEnvironmentin interfaceEnvironmentAware
-