Package org.springframework.pulsar.core
Class DefaultPulsarClientFactory
java.lang.Object
org.springframework.pulsar.core.DefaultPulsarClientFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.EnvironmentAware,PulsarClientFactory
public class DefaultPulsarClientFactory
extends Object
implements PulsarClientFactory, org.springframework.context.EnvironmentAware
Default implementation for
PulsarClientFactory.-
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(org.springframework.core.env.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
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
-