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 TypeMethodDescriptionGet the default template to use to retry startup when no custom retry template has been specified.@Nullable Object@Nullable AsyncTaskExecutor@Nullable org.apache.pulsar.client.api.Schema<?> @Nullable org.apache.pulsar.common.schema.SchemaType@Nullable org.apache.pulsar.client.api.MessageId@Nullable 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(@Nullable org.apache.pulsar.client.api.Schema<?> schema) voidsetSchemaResolver(SchemaResolver schemaResolver) voidsetSchemaType(@Nullable 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(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 @Nullable org.apache.pulsar.client.api.MessageId getStartMessageId() -
setStartMessageId
public void setStartMessageId(org.apache.pulsar.client.api.MessageId startMessageId) -
getSchema
public @Nullable org.apache.pulsar.client.api.Schema<?> getSchema() -
setSchema
public void setSchema(@Nullable org.apache.pulsar.client.api.Schema<?> schema) -
getSchemaType
public @Nullable org.apache.pulsar.common.schema.SchemaType getSchemaType() -
setSchemaType
public void setSchemaType(@Nullable org.apache.pulsar.common.schema.SchemaType schemaType) -
getSchemaResolver
-
setSchemaResolver
-
getStartupFailureRetryTemplate
-
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
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
-