Package org.springframework.pulsar.core
Class DefaultPulsarClientFactory
java.lang.Object
org.springframework.pulsar.core.DefaultPulsarClientFactory
- All Implemented Interfaces:
Aware
,EnvironmentAware
,PulsarClientFactory
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.PulsarClient
Create a client.void
setEnvironment
(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:PulsarClientFactory
Create a client.- Specified by:
createClient
in interfacePulsarClientFactory
- Returns:
- the created client instance
-
setEnvironment
- Specified by:
setEnvironment
in interfaceEnvironmentAware
-