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 Details

    • DefaultPulsarClientFactory

      public DefaultPulsarClientFactory(String serviceUrl)
      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

      public DefaultPulsarClientFactory(PulsarClientBuilderCustomizer customizer)
      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 interface PulsarClientFactory
      Returns:
      the created client instance
    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware