public interface ChangeFeedProcessor
ChangeFeedObserver
and register processor implementation with ChangeFeedProcessor
.
It uses auxiliary document collection for managing leases for a partition. Every EventProcessorHost instance is performing the following two tasks: 1) Renew Leases: It keeps track of leases currently owned by the host and continuously keeps on renewing the leases. 2) Acquire Leases: Each instance continuously polls all leases to check if there are any leases it should acquire for the system to get into balanced state.
ChangeFeedProcessor changeFeedProcessor = ChangeFeedProcessor.Builder()
.hostName(hostName)
.feedContainer(feedContainer)
.leaseContainer(leaseContainer)
.handleChanges(docs -> {
// Implementation for handling and processing CosmosItemProperties list goes here
})
.build();
Modifier and Type | Interface and Description |
---|---|
static interface |
ChangeFeedProcessor.BuilderDefinition
The
ChangeFeedProcessor builder definitions for setting the properties. |
Modifier and Type | Method and Description |
---|---|
static ChangeFeedProcessor.BuilderDefinition |
Builder()
Helper static method to build
ChangeFeedProcessor instances
as logical representation of the Azure Cosmos DB database service. |
reactor.core.publisher.Mono<Void> |
start()
Start listening for changes asynchronously.
|
reactor.core.publisher.Mono<Void> |
stop()
Stops listening for changes asynchronously.
|
reactor.core.publisher.Mono<Void> start()
reactor.core.publisher.Mono<Void> stop()
static ChangeFeedProcessor.BuilderDefinition Builder()
ChangeFeedProcessor
instances
as logical representation of the Azure Cosmos DB database service.
ChangeFeedProcessor.Builder()
.hostName("SampleHost")
.feedContainer(feedContainer)
.leaseContainer(leaseContainer)
.handleChanges(docs -> {
// Implementation for handling and processing CosmosItemProperties list goes here
})
.build();
Copyright © 2019. All rights reserved.