title: How to store eventhub checkpoint data locally in Java
body: <p>I'm trying to find an example of Custom Checkpoint Manager in JAVA, that can store checkpoint data in a local folder.</p>
  
  <p>Basically, I'm building a java application that reads data from azure event hub with multiple consumer groups. Previously I was instantiating the EventProcessorHost using storage account connection string and storage container located in azure blobs - which was working fine. </p>
  
  <p>POM entry:</p>
  
  <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;com.microsoft.azure&lt;/groupId&gt;
              &lt;artifactId&gt;azure-eventhubs-eph&lt;/artifactId&gt;
              &lt;version&gt;2.4.0&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>Java code for instantiating the host:</p>
  
  <pre><code>storageConnectionString="DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=MyAccountKey;EndpointSuffix=core.windows.net";
  storageContainerName="MyContainerName",
  
  EventProcessorHost host = new EventProcessorHost(
                  EventProcessorHost.createHostName(hostNamePrefix),
                  eventHubName,
                  consumerGroupName,
                  eventHubConnectionString.toString(),
                  storageConnectionString,
                  storageContainerName);
  </code></pre>
  
  <p>Now, the requirement is to use local folder in Azure Databricks cluster (a DBFS:/ path) to store the checkpoint data.</p>
  
  <p>I think I'll have to write a custom checkpoint manager implementing ICheckpointManager. I was able to find an <a href="https://github.com/mikhailshilkov/mikhailio-samples/blob/master/eventhubs-sqlcheckpoints/SQLCheckpointManager.cs" rel="nofollow noreferrer">example</a> doing this in SQL database, but I wasn't able to find an example of CheckpointManager storing checkpoint data on a local folder.</p>
  
  <p>Can anyone please help, either give me a link to the example or a code snippet?</p>