Implementing ILeaseManager for EventProcessorHost

141 Views Asked by At

On the project I am working on I DO NOT want to use Azure Storage to manage my offsets and checkpoints and plan to use a database approach to store them instead. I am using EventProcessor to read events from an event hub and I understand I can create my own implementations of ILeaseManager and ICheckpointManager to achieve this. I have a good understanding of how ICheckpointManager works but I can not find any useful guidelines to help with a custom implementation of ILeaseManager. In fact I only need the minimal implementation of ILeaseManager because I am working with only one partition for now. When I run my application I get an error because the CreateLeaseIfNotExistAsync is not implemented and I do not know how to implement it as per this question.

1

There are 1 best solutions below

0
silent On

In the official GitHub repo you find an example for an in-memory StorageManager, which implements StorageManager as an alternative to the BlobStorageManager. This should give you sufficient material do build you own.