> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/tasks/tasks/azure-event-hub/updatecheckpoint.md). Agents can also search and read this documentation through its [MCP server](https://docs.frends.com/~gitbook/mcp).

# UpdateCheckpoint

Task to rewind checkpoints in an Azure Storage container for a specified Event Hub consumer group.

Task version: 3.0.0

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.AzureEventHub/tree/main/Frends.AzureEventHub.UpdateCheckpoint>

## Task Parameters

{% tabs %}
{% tab title="Input" %}

| Name                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| EventHubName : `String`       | <p>The name of the Azure Event Hub.</p><p><br>Default: <code>-</code><br>Example: <code>myeventhub</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ConsumerGroup : `String`      | <p>The consumer group whose checkpoint should be updated.</p><p><br>Default: <code>-</code><br>Example: <code>$Default</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Targets : `PartitionTarget[]` | <p>Per-partition checkpoint targets. Each target selects a partition and a positioning mode</p><p>(relative rollback, absolute sequence number, or absolute enqueued time). At least one</p><p>target must be provided. The target position is validated automatically against the partition's available</p><p>sequence range, so no manual lookup of the current checkpoint or sequence numbers is required.</p><p><br>Default: <code>-</code><br>Example: <code>\[ { "PartitionId": "0", "Mode": "AbsoluteSequenceNumber", "TargetSequenceNumber": 1500 } ]</code></p> |
| {% endtab %}                  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

{% tab title="Connection" %}

| Name                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| StorageAccountName : `String`         | <p>Name of the Azure Storage Account.</p><p><br>Default: <code>-</code><br>Example: <code>mystorageaccount</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ContainerName : `String`              | <p>Name of the blob container used for checkpoints.</p><p><br>Default: <code>-</code><br>Example: <code>checkpoint-container</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| EventHubNamespace : `String`          | <p>Namespace of the Event Hub.</p><p><br>Default: <code>-</code><br>Example: <code>myeventhubnamespace</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| AuthMethod : `AuthMethod`             | <p>Authentication method to use.</p><p>Possible values:</p><ul><li><code>ConnectionString</code>: Authenticate using a connection string (contains key/secret).</li><li><code>SasToken</code>: Authenticate using a short-lived SAS (Shared Access Signature) token.</li><li><code>OAuth</code>: Authenticate using OAuth 2.0 (Azure AD credentials).</li></ul><p><br>Default: <code>-</code><br>Example: <code>ConnectionString</code></p>                                                                                                                                                                                                                                                |
| 🗝ConnectionString : `String`         | <p>Full connection string to the Azure Storage account.</p><p>Used if AuthMethod is ConnectionString.</p><p><br>Default: <code>-</code><br>Example: <code>DefaultEndpointsProtocol=https;AccountName=mystorage;AccountKey=KEY;EndpointSuffix=core.windows.net</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 🗝SasToken : `String`                 | <p>SAS token for accessing the blob storage.</p><p>Used if AuthMethod is SasToken.</p><p><br>Default: <code>-</code><br>Example: <code>?sv=2020-08-04ss=bsrt=scosp=rw</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| OAuth : `OAuthConfig`                 | <p>OAuth configuration: includes tenant ID, client ID, client secret, etc.</p><p>Used if AuthMethod is OAuth.</p><p><br>Default: <code>-</code><br>Example: <code>{ "TenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "ClientId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy" }</code></p>                                                                                                                                                                                                                                                                                                                                                                                                    |
| OAuth.TenantId : `String`             | <p>The Azure Active Directory tenant ID.</p><p><br>Default: <code>-</code><br>Example: <code>a1b2c3d4-5678-90ef-1234-567890abcdef</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| OAuth.ClientId : `String`             | <p>The application/client ID registered in Azure AD.</p><p><br>Default: <code>-</code><br>Example: <code>d4e5f6a7-8901-2345-6789-0b1c2d3e4f5g</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 🗝OAuth.ClientSecret : `String`       | <p>The client secret for the registered application.</p><p><br>Default: <code>-</code><br>Example: <code>ABC</code><del><code>12345</code></del><code>abcdefghijklmnopqrstuvwxyz67890</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| EventHubAuthMethod : `AuthMethod`     | <p>Authentication method used to connect to the Event Hub. The Event Hub connection is</p><p>required to resolve the partition's current sequence range and to support enqueued-time</p><p>targets. Defaults to OAuth using the Event Hub namespace and the OAuth configuration above.</p><p>Possible values:</p><ul><li><code>ConnectionString</code>: Authenticate using a connection string (contains key/secret).</li><li><code>SasToken</code>: Authenticate using a short-lived SAS (Shared Access Signature) token.</li><li><code>OAuth</code>: Authenticate using OAuth 2.0 (Azure AD credentials).</li></ul><p><br>Default: <code>OAuth</code><br>Example: <code>OAuth</code></p> |
| 🗝EventHubConnectionString : `String` | <p>Connection string to the Event Hub. Used if EventHubAuthMethod is ConnectionString.</p><p><br>Default: <code>-</code><br>Example: <code>Endpoint=sb://mynamespace.servicebus.windows.net/;SharedAccessKeyName=KeyName;SharedAccessKey=KeyValue</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 🗝EventHubSasToken : `String`         | <p>SAS token for the Event Hub. Used if EventHubAuthMethod is SasToken.</p><p><br>Default: <code>-</code><br>Example: <code>?sv=2020-08-04\&ss=b\&sp=r</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| {% endtab %}                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

{% tab title="Options" %}

| Name                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FailIfPartitionMissing : `Boolean` | <p>Controls behavior when a partition targeted with RelativeRollback mode has no existing</p><p>checkpoint to roll back from.</p><p>If true, processing of further partitions stops as soon as a missing checkpoint is encountered;</p><p>partitions already updated remain updated.</p><p>If false, the partition is skipped and recorded as an error, and processing continues with the</p><p>remaining partitions.</p><p>In both cases the partition is recorded as skipped/errored, and the operation is considered</p><p>unsuccessful; it either throws or returns a failure result depending on ThrowErrorOnFailure.</p><p>This operation is not transactional; updates applied before a failure are not reverted.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p> |
| FailIfPartitionOwned : `Boolean`   | <p>Controls behavior when the consuming Process still owns a partition (an active</p><p>ownership record exists in the checkpoint container). Rewinding a checkpoint while</p><p>the Process owns the partition races with the Process's own checkpoint writes.</p><p>If true, the partition is failed with a clear error and left unchanged.</p><p>If false, the checkpoint is rewritten anyway and the race is the operator's responsibility.</p><p>The consuming Process should be stopped before rewinding.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                            |
| ThrowErrorOnFailure : `Boolean`    | <p>True: Throw an exception.</p><p>False: Error will be returned in Result.Error instead of stopping the Task.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ErrorMessageOnFailure : `String`   | <p>Message what will be used when error occurs.</p><p><br>Default: <code>-</code><br>Example: <code>Task failed during execution</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| {% endtab %}                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| {% endtabs %}                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

## Task Result

| Name                               | Description                                                                                                                                                                                                                                     |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success : `Boolean`                | <p>Indicates whether update checkpoint operration was successfull.<br>Example: <code>true</code></p>                                                                                                                                            |
| UpdatedPartitions : `String[]`     | <p>List of partitions that were successfully updated.<br>Example: <code>\[ "0", "1" ]</code></p>                                                                                                                                                |
| SkippedPartitions : `String[]`     | <p>List of partitions skipped due to missing checkpoints or errors.<br>Example: <code>\[ "2" ]</code></p>                                                                                                                                       |
| RollbackApplied : `Boolean`        | <p>Indicates if rollback was applied.<br>Example: <code>true</code></p>                                                                                                                                                                         |
| Error : `Error`                    | <p>Error details for the failed operation. Partition failures are grouped in an AggregateException in AdditionalInfo. Null when the operation succeeds.<br>Example: <code>{ "Message": "Failed to update one or more checkpoints." }</code></p> |
| Error.Message : `String`           | <p>Summary of the error.<br>Example: <code>Unable to join strings.</code></p>                                                                                                                                                                   |
| Error.AdditionalInfo : `Exception` | <p>The original exception, or an AggregateException containing per-partition failures.<br>Example: <code>object { Exception Exception }</code></p>                                                                                              |
| AppliedTargets : `AppliedTarget[]` | <p>Audit trail of applied checkpoint changes (partition, previous position, new position).<br>Example: <code>\[ { "PartitionId": "0", "PreviousSequenceNumber": 1800, "NewSequenceNumber": 1500 } ]</code></p>                                  |

## Task Changelog

Changelog for Task Frends.AzureEventHub.UpdateCheckpoint.

### \[3.0.0] - 2026-09-29

#### Changed

* \[Breaking Change] Move `Result.Errors` to `Result.Error` and use AggregateException in case of multiple errors

### \[2.0.0] - 2026-09-11

#### Changed

* **Breaking:** Unified checkpoint targeting into a single `Input.Targets` list. Each `PartitionTarget` now has a `Mode` (`RelativeRollback`, `AbsoluteSequenceNumber`, `AbsoluteEnqueuedTime`) that selects which of `RollbackEvents`, `TargetSequenceNumber`, or `TargetEnqueuedTime` is used.
* **Breaking:** Removed `Input.PartitionIds` and `Input.RollbackEvents`. Relative rollback is now configured per-partition via a `PartitionTarget` with `Mode = RelativeRollback` and `RollbackEvents` set.
* `Options.FailIfPartitionMissing` is now respected when a RelativeRollback target has no existing checkpoint, setting it to true stops processing of any remaining partitions (already-applied changes are kept), while false continues processing the rest as before.
* Checkpoints are now written through the supported `BlobCheckpointStore.UpdateCheckpointAsync` API instead of direct blob metadata manipulation.
* Invalid partition IDs and out-of-range sequence numbers now produce clear, per-partition errors.

#### Added

* Absolute per-partition targeting via `Input.Targets`, allowing operators to set a specific `TargetSequenceNumber` or `TargetEnqueuedTime` per partition without manual arithmetic.
* Event Hub connection parameters (`EventHubNamespace`, `EventHubAuthMethod`, `EventHubConnectionString`, `EventHubSasToken`) so the Task can resolve partition ranges via `GetPartitionPropertiesAsync`.
* `FailIfPartitionOwned` option to guard against rewinding partitions currently owned by a running consumer.
* `Result.AppliedTargets` audit trail recording partition, previous sequence number and new sequence number for each applied change.

### \[1.4.0] - 2026-08-13

#### Changed

* Added documentation link and error property to comply with Frends task standards.

### \[1.3.0] - 2026-01-22

#### Changed

* Set FailIfPartitionMissing default to false and clarified its documentation, including how skipped partitions are treated and how it interacts with ThrowErrorOnFailure

### \[1.2.0] - 2026-01-16

#### Changed

* Update Azure packages to latest versions.
  * Azure.Storage.Blobs to 12.27.0

### \[1.1.0] - 2025-11-20

#### Changed

* Fixed checkpoint implementation to use Azure Event Hubs metadata format and removed unsupported timestamp adjustment feature.

### \[1.0.0] - 2025-07-23

#### Changed

* Initial implementation


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.frends.com/tasks/tasks/azure-event-hub/updatecheckpoint.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
