Package org.springframework.pulsar.core
Class PulsarAdministration
java.lang.Object
org.springframework.pulsar.core.PulsarAdministration
- All Implemented Interfaces:
Aware,SmartInitializingSingleton,ApplicationContextAware,PulsarAdministrationOperations
public class PulsarAdministration
extends Object
implements ApplicationContextAware, SmartInitializingSingleton, PulsarAdministrationOperations
An administration class that delegates to
PulsarAdmin to create and manage
topics defined in the application context.- Author:
- Alexander Preuß, Chris Bono, Kirill Merkushev
-
Constructor Summary
ConstructorsConstructorDescriptionPulsarAdministration(String serviceHttpUrl) Construct a default instance using the specified service url.PulsarAdministration(List<PulsarAdminBuilderCustomizer> adminCustomizers) Construct an instance with the specified customizations.PulsarAdministration(PulsarAdminBuilderCustomizer adminCustomizer) Construct an instance with the specified customizations. -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.apache.pulsar.client.admin.PulsarAdminvoidcreateOrModifyTopics(PulsarTopic... topics) Create or modify the given topics.voidsetApplicationContext(ApplicationContext applicationContext)
-
Constructor Details
-
PulsarAdministration
Construct a default instance using the specified service url.- Parameters:
serviceHttpUrl- the admin http service url
-
PulsarAdministration
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
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:
afterSingletonsInstantiatedin interfaceSmartInitializingSingleton
-
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
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
Description copied from interface:PulsarAdministrationOperationsCreate or modify the given topics.- Specified by:
createOrModifyTopicsin interfacePulsarAdministrationOperations- Parameters:
topics- the topics to create or change
-