public interface ChangeFeedProcessor
There are four main components of implementing the change feed processor:
ChangeFeedProcessor changeFeedProcessor = new ChangeFeedProcessorBuilder() .hostName(hostName) .feedContainer(feedContainer) .leaseContainer(leaseContainer) .handleChanges(docs -> { for (JsonNode item : docs) { // Implementation for handling and processing of each JsonNode item goes here } }) .buildChangeFeedProcessor();
Modifier and Type | Method and Description |
---|---|
Mono<List<ChangeFeedProcessorState>> |
getCurrentState()
Returns a read only list of states each representing one scoped worker item.
|
Mono<Map<String,Integer>> |
getEstimatedLag()
Returns the current owner (host) and an approximation of the difference between the last processed item (defined
by the state of the feed container) and the latest change in the container for each partition (lease
item).
|
boolean |
isStarted()
Returns the state of the change feed processor.
|
Mono<Void> |
start()
Start listening for changes asynchronously.
|
Mono<Void> |
stop()
Stops listening for changes asynchronously.
|
Mono<Void> start()
Mono<Void> stop()
boolean isStarted()
Mono<Map<String,Integer>> getEstimatedLag()
An empty map will be returned if the processor was not started or no lease items matching the current
ChangeFeedProcessor
instance's lease prefix could be found.
@Beta(value=V4_5_1, warningText="Preview API - subject to change in non-backwards compatible way") Mono<List<ChangeFeedProcessorState>> getCurrentState()
An empty list will be returned if the processor was not started or no lease items matching the current
ChangeFeedProcessor
instance's lease prefix could be found.
Copyright © 2021 Microsoft Corporation. All rights reserved.