# EventHubCheckpointer Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubcheckpointer/)

## Create(AzureTableStreamCheckpointerOptions, string, string, string, ILoggerFactory) {#create-orleans-configuration-azuretablestreamcheckpointeroptions-string-string-s-5596f604}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubcheckpointer/methods/create-orleans-configuration-azuretablestreamcheckpointeroptions-string-string-s-5596f604/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubCheckpointer.cs#L74-L77)

```csharp
public static Task<IStreamQueueCheckpointer<string>> Create(AzureTableStreamCheckpointerOptions options, string streamProviderName, string partition, string serviceId, ILoggerFactory loggerFactory)
```

Factory function that creates and initializes the checkpointer

### Parameters

- `options` (`AzureTableStreamCheckpointerOptions`)
- `streamProviderName` (`string`)
- `partition` (`string`)
- `serviceId` (`string`)
- `loggerFactory` (`ILoggerFactory`)

## FlushAsync(CancellationToken) {#flushasync-system-threading-cancellationtoken-1d9f8a06}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubcheckpointer/methods/flushasync-system-threading-cancellationtoken-1d9f8a06/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubCheckpointer.cs#L167-L175)

```csharp
public Task FlushAsync(CancellationToken cancellationToken)
```

Flushes any pending checkpoint to persistent storage. Awaits any in-progress save, then persists the latest offset if it has advanced beyond the last saved value.

### Parameters

- `cancellationToken` (`CancellationToken`): The cancellation token.

## Load {#load-fe9c5397}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubcheckpointer/methods/load-fe9c5397/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubCheckpointer.cs#L113-L122)

```csharp
public Task<string> Load()
```

Loads a checkpoint

## Update(string, DateTime) {#update-string-system-datetime-106dab43}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubcheckpointer/methods/update-string-system-datetime-106dab43/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubCheckpointer.cs#L134-L151)

```csharp
public void Update(string offset, DateTime utcNow)
```

Updates the checkpoint. This is a best effort. It does not always update the checkpoint. The latest offset is always tracked in memory so that [EventHubCheckpointer](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubcheckpointer/) can persist it on shutdown.

### Parameters

- `offset` (`string`)
- `utcNow` (`DateTime`)
