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
ConstructorDescriptionPulsarAdministration
(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 TypeMethodDescriptionvoid
org.apache.pulsar.client.admin.PulsarAdmin
void
createOrModifyTopics
(PulsarTopic... topics) Create or modify the given topics.void
setApplicationContext
(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:
afterSingletonsInstantiated
in interfaceSmartInitializingSingleton
-
setApplicationContext
- Specified by:
setApplicationContext
in 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:PulsarAdministrationOperations
Create or modify the given topics.- Specified by:
createOrModifyTopics
in interfacePulsarAdministrationOperations
- Parameters:
topics
- the topics to create or change
-