# UpdateCheckpoint

Required Frends version: 5.7+

Required .NET version: 8.0

Compatible Agents: Unknown

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

{% tabs %}
{% tab title="Parameter: 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> |
| PartitionIds : `String[]` | <p>List of partition IDs to update.</p><p><br>Default: <code>-</code><br>Example: <code>\[ "0", "1", "2" ]</code></p>             |
| RollbackEvents : `Int32`  | <p>Number of events to roll back the checkpoint by (can be 0).</p><p><br>Default: <code>-</code><br>Example: <code>5</code></p>   |
| {% endtab %}              |                                                                                                                                   |

{% tab title="Parameter: 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>:</li></ul><p>Authentication method to use.</p><ul><li><code>SasToken</code>:</li></ul><p>Authentication method to use.</p><ul><li><code>OAuth</code>:</li></ul><p>Authentication method to use.</p><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>                                                                                          |
| {% endtab %}                  |                                                                                                                                                                                                                                                                                                                                                                                  |

{% tab title="Parameter: Options" %}

| Name                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| FailIfPartitionMissing : `Boolean` | <p>Controls behavior when a specified partition checkpoint does not exist.</p><p>If true, the operation fails when a partition is missing.</p><p>If false, the partition is skipped and recorded as an error, and processing continues.</p><p>When partitions are skipped, the operation is considered unsuccessful; it either</p><p>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> |
| ThrowErrorOnFailure : `Boolean`    | <p>True: Throw an exception.</p><p>False: Error will be added to the Result.Error.AdditionalInfo list 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 %}                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

{% tab title="Result: 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>                                                                      |
| Errors : `Error[]`             | <p>List of error messages, if any, per partition.<br>Example: <code>\[ { "PartitionId": "2", "Error": "Checkpoint not found." } ]</code></p> |
| {% endtab %}                   |                                                                                                                                              |

{% tab title="Changelog" %}

## Changelog

### \[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
  {% endtab %}
  {% endtabs %}
