public class PulsarSpoutConfiguration extends PulsarStormConfiguration
| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_FAILED_RETRIES_TIMEOUT_NANO |
static int |
DEFAULT_MAX_FAILED_RETRIES |
DEFAULT_METRICS_TIME_INTERVAL_IN_SECS| Constructor and Description |
|---|
PulsarSpoutConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
long |
getFailedRetriesTimeout(TimeUnit unit) |
int |
getMaxFailedRetries() |
MessageToValuesMapper |
getMessageToValuesMapper() |
String |
getSubscriptionName() |
boolean |
isSharedConsumerEnabled() |
void |
setFailedRetriesTimeout(long failedRetriesTimeout,
TimeUnit unit)
Sets the timeout within which the spout will re-inject failed messages with an exponential backoff (default:
60 seconds) Note: If set to 0, the message will not be retried when failed.
|
void |
setMaxFailedRetries(int maxFailedRetries)
Sets the maximum number of times the spout will re-inject failed messages with an exponential backoff
(default: -1) Note: If set to 0, the message will not be retried when failed.
|
void |
setMessageToValuesMapper(MessageToValuesMapper mapper)
Sets the mapper to convert pulsar message to a storm tuple.
|
void |
setSharedConsumerEnabled(boolean sharedConsumerEnabled)
Sets whether the consumer will be shared across different executors of a spout.
|
void |
setSubscriptionName(String subscriptionName)
Sets the subscription name for the consumer in the spout
|
getMetricsTimeIntervalInSecs, getServiceUrl, getTopic, setMetricsTimeIntervalInSecs, setServiceUrl, setTopicpublic static final long DEFAULT_FAILED_RETRIES_TIMEOUT_NANO
public static final int DEFAULT_MAX_FAILED_RETRIES
public String getSubscriptionName()
public void setSubscriptionName(String subscriptionName)
subscriptionName - public MessageToValuesMapper getMessageToValuesMapper()
public void setMessageToValuesMapper(MessageToValuesMapper mapper)
Note: If the mapper returns null, the message is not emitted to the collector and is acked immediately
mapper - public long getFailedRetriesTimeout(TimeUnit unit)
unit - public void setFailedRetriesTimeout(long failedRetriesTimeout,
TimeUnit unit)
failedRetriesTimeout - unit - public int getMaxFailedRetries()
public void setMaxFailedRetries(int maxFailedRetries)
maxFailedRetries - public boolean isSharedConsumerEnabled()
public void setSharedConsumerEnabled(boolean sharedConsumerEnabled)
sharedConsumerEnabled - Copyright © 2017 Apache Software Foundation. All rights reserved.