Class PulsarReaderContainerProperties
java.lang.Object
org.springframework.pulsar.reader.PulsarReaderContainerProperties
Container properties for Pulsar
Reader.- Author:
- Soby Chacko
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.retry.support.RetryTemplateGet the default template to use to retry startup when no custom retry template has been specified.org.apache.pulsar.client.api.Schema<?>org.apache.pulsar.common.schema.SchemaTypeorg.apache.pulsar.client.api.MessageIdorg.springframework.retry.support.RetryTemplatevoidsetReaderListener(Object readerListener) voidsetReaderStartTimeout(Duration readerStartTimeout) Set the timeout to wait for a reader thread to start before logging an error.voidsetReaderTaskExecutor(AsyncTaskExecutor readerExecutor) voidsetSchema(org.apache.pulsar.client.api.Schema<?> schema) voidsetSchemaResolver(SchemaResolver schemaResolver) voidsetSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType) voidsetStartMessageId(org.apache.pulsar.client.api.MessageId startMessageId) voidsetStartupFailurePolicy(StartupFailurePolicy startupFailurePolicy) The action to take on the container when a failure occurs during startup.voidsetStartupFailureRetryTemplate(org.springframework.retry.support.RetryTemplate startupFailureRetryTemplate) Set the template to use to retry startup when an exception occurs during startup.void
-
Constructor Details
-
PulsarReaderContainerProperties
public PulsarReaderContainerProperties()
-
-
Method Details
-
getReaderListener
-
setReaderListener
-
getReaderTaskExecutor
-
setReaderTaskExecutor
-
getReaderStartTimeout
-
setReaderStartTimeout
Set the timeout to wait for a reader thread to start before logging an error. Default 30 seconds.- Parameters:
readerStartTimeout- the reader start timeout.
-
getTopics
-
setTopics
-
getStartMessageId
public org.apache.pulsar.client.api.MessageId getStartMessageId() -
setStartMessageId
public void setStartMessageId(org.apache.pulsar.client.api.MessageId startMessageId) -
getSchema
public org.apache.pulsar.client.api.Schema<?> getSchema() -
setSchema
public void setSchema(org.apache.pulsar.client.api.Schema<?> schema) -
getSchemaType
public org.apache.pulsar.common.schema.SchemaType getSchemaType() -
setSchemaType
public void setSchemaType(org.apache.pulsar.common.schema.SchemaType schemaType) -
getSchemaResolver
-
setSchemaResolver
-
getStartupFailureRetryTemplate
-
getDefaultStartupFailureRetryTemplate
public org.springframework.retry.support.RetryTemplate getDefaultStartupFailureRetryTemplate()Get the default template to use to retry startup when no custom retry template has been specified.- Returns:
- the default retry template that will retry 3 times with a fixed delay of 10 seconds between each attempt.
- Since:
- 1.2.0
-
setStartupFailureRetryTemplate
public void setStartupFailureRetryTemplate(org.springframework.retry.support.RetryTemplate startupFailureRetryTemplate) Set the template to use to retry startup when an exception occurs during startup.- Parameters:
startupFailureRetryTemplate- the retry template to use- Since:
- 1.2.0
-
getStartupFailurePolicy
-
setStartupFailurePolicy
The action to take on the container when a failure occurs during startup.- Parameters:
startupFailurePolicy- action to take when a failure occurs during startup- Since:
- 1.2.0
-