public interface LightblueDocumentEventRepositoryConfig
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getCanonicalTypesToProcess()
Governs whether or not document events are processed based on their type.
|
java.time.Duration |
getDocumentEventExpireThreshold()
How long before a document event is available for retrieval do we drop the event and let it
be reprocessed?
|
java.time.Duration |
getDocumentEventProcessingTimeout()
How long can a document event remain processing before we allow it to be retrieved again for
reprocessing?
|
Integer |
getDocumentEventsBatchSize()
Not to be confused with the maximum number of document events passed to
DocumentEventRepository.retrievePriorityDocumentEventsUpTo(int), this governs the
max batch size of events fetched from lightblue and available for optimization. |
Optional<Integer> |
getOptionalMaxDocumentEventsPerInsert()
When adding new document events, we can make (total new events) / (max events per insert)
requests, instead of one request with all new events in a single call.
|
Set<String> getCanonicalTypesToProcess()
A repository will never process types which it is not configured to support.
Integer getDocumentEventsBatchSize()
DocumentEventRepository.retrievePriorityDocumentEventsUpTo(int), this governs the
max batch size of events fetched from lightblue and available for optimization.
For example, if you ask for 50 document events to be retrieved, and your batch size is 100, we will initially fetch 100 document events (assuming there are <= 100 events waiting to be processed) from lightblue. Among those 100, we will try to optimize away as many events as possible by checking for events which can be merged or superseded. Finally, among those left, we will return the 50 highest priority events. Any remaining events past 50 will be untouched, available for future retrievals.
java.time.Duration getDocumentEventProcessingTimeout()
java.time.Duration getDocumentEventExpireThreshold()
In other words, this governs when we stop processing an event in flight because we're too
near when another retrieval may see it is past its
getDocumentEventProcessingTimeout() and retrieve it for reprocessing.
N.B. The existence of this configuration is a function of our current transaction scheme. This could go away, for instance, if we either atomically updated an event's processing timestamp before publishing its document. Other alternative schemes are possible.
Optional<Integer> getOptionalMaxDocumentEventsPerInsert()
Setting a limit is recommended as it protects against potentially extremely significant notifications producing a huge quantity of document events and failing to insert them all in one call.
Copyright © 2017. All rights reserved.