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.core.retry.RetryTemplate
Get 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 org.springframework.core.retry.RetryTemplate
void
setReaderListener
(Object readerListener) void
setReaderStartTimeout
(Duration readerStartTimeout) Set the timeout to wait for a reader thread to start before logging an error.void
setReaderTaskExecutor
(AsyncTaskExecutor readerExecutor) void
setSchema
(@Nullable org.apache.pulsar.client.api.Schema<?> schema) void
setSchemaResolver
(SchemaResolver schemaResolver) void
setSchemaType
(@Nullable org.apache.pulsar.common.schema.SchemaType schemaType) void
setStartMessageId
(org.apache.pulsar.client.api.MessageId startMessageId) void
setStartupFailurePolicy
(StartupFailurePolicy startupFailurePolicy) The action to take on the container when a failure occurs during startup.void
setStartupFailureRetryTemplate
(org.springframework.core.retry.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
public @Nullable org.springframework.core.retry.RetryTemplate getStartupFailureRetryTemplate() -
getDefaultStartupFailureRetryTemplate
public org.springframework.core.retry.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.core.retry.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
-