PersistentSubscriptionSettings constructor
PersistentSubscriptionSettings({
- Position? startFrom,
- int readBatchSize = 20,
- int maxRetryCount = 10,
- int liveBufferSize = 500,
- bool resolveLinkTos = false,
- bool extraStatistics = false,
- int maxSubscriberCount = 0,
- int historyBufferSize = 500,
- int minCheckPointCount = 10,
- int maxCheckPointCount = 1000,
- Duration checkPointAfter = const Duration(seconds: 2),
- Duration messageTimeout = const Duration(seconds: 30),
- SystemConsumerStrategies consumerStrategy = SystemConsumerStrategies.roundRobin,
Construct a new PersistentSubscriptionSettings instance
Implementation
PersistentSubscriptionSettings({
this.startFrom,
this.readBatchSize = 20,
this.maxRetryCount = 10,
this.liveBufferSize = 500,
this.resolveLinkTos = false,
this.extraStatistics = false,
this.maxSubscriberCount = 0,
this.historyBufferSize = 500,
this.minCheckPointCount = 10,
this.maxCheckPointCount = 1000,
this.checkPointAfter = const Duration(seconds: 2),
this.messageTimeout = const Duration(seconds: 30),
this.consumerStrategy = SystemConsumerStrategies.roundRobin,
}) {
if (messageTimeout < Duration.zero || messageTimeout.inMilliseconds > Max) {
throw ArgumentError.value(
messageTimeout,
'messageTimeout',
'must be greater than 0 and less than or equal to $Max',
);
}
if (checkPointAfter < Duration.zero ||
checkPointAfter.inMilliseconds > Max) {
throw ArgumentError.value(
checkPointAfter,
'checkPointAfter',
'must be greater than 0 and less than or equal to $Max',
);
}
}