Class PulsarAdministration

java.lang.Object
org.springframework.pulsar.core.PulsarAdministration
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.context.ApplicationContextAware, PulsarAdministrationOperations

public class PulsarAdministration extends Object implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.SmartInitializingSingleton, PulsarAdministrationOperations
An administration class that delegates to PulsarAdmin to create and manage topics defined in the application context.
  • Constructor Details

    • PulsarAdministration

      public PulsarAdministration(String serviceHttpUrl)
      Construct a default instance using the specified service url.
      Parameters:
      serviceHttpUrl - the admin http service url
    • PulsarAdministration

      public PulsarAdministration(@Nullable PulsarAdminBuilderCustomizer adminCustomizer)
      Construct an instance with the specified customizations.
      Parameters:
      adminCustomizer - the customizer to apply to the builder or null to use the default admin builder without modifications
    • PulsarAdministration

      public PulsarAdministration(List<PulsarAdminBuilderCustomizer> adminCustomizers)
      Construct an instance with the specified customizations.
      Parameters:
      adminCustomizers - the customizers to apply to the builder or null to use the default admin builder without modifications
  • Method Details

    • afterSingletonsInstantiated

      public void afterSingletonsInstantiated()
      Specified by:
      afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • createAdminClient

      public org.apache.pulsar.client.admin.PulsarAdmin createAdminClient() throws org.apache.pulsar.client.api.PulsarClientException
      Throws:
      org.apache.pulsar.client.api.PulsarClientException
    • createOrModifyTopics

      public void createOrModifyTopics(PulsarTopic... topics)
      Description copied from interface: PulsarAdministrationOperations
      Create or modify the given topics.
      Specified by:
      createOrModifyTopics in interface PulsarAdministrationOperations
      Parameters:
      topics - the topics to create or change