set_change_data_retention_barrier
The method can be used to:
- Set a retention barrier for deleting consumed partitions. Setting a retention barrier will initiate periodic deletion of consumed Change Data Partitions from the target database defined for the specified task. Partitions will be deleted according to the Allow consuming applications to delete partitions every interval set on Replicate Server, and up to the specified "retention_point".
- Remove the retention barrier, thereby stopping periodic deletion of consumed Change Data Partitions.
- Partitions will only be deleted if the Change Data Partitioning and Partition Retention options are enabled in the Replicate console.
- Partitions will only be deleted if the task is running. If the task is not running, the partitions will be deleted the next time it runs.
- Only partitions that are not locked by a consuming application will be deleted.
Required User Role: See Required Enterprise Manager permissions.
Syntax
public void SetChangeDataRetentionBarrier(
AemSetChangeDataRetentionBarrierReq payload,
string server,
string task
);
Parameters
Parameter | Type | Description |
---|---|---|
payload | AemSetChangeDataRetentionBarrierReq |
Payload for Setting a Retention Barrier: retention_point=timestamp application=application_name Where:
Example: retention_point=2020-06-30T16:15:00Z application=Compose Payload for Removing the Retention Barrier: retention_point= application=application_name Where application_name is the name of the consuming application. |
server |
string |
The name of the server on which the task is running. |
task | string | The name of the task. |
Error response
Error | Message | Description |
---|---|---|
AEM_TASK_NOT_FOUND |
Replication task {task] on server {server} could not be found. |
Returned when an unknown task name is encountered. |
AEM_INVALID_TIMESTAMP_FORMAT | The specified partition retention barrier does not conform to the expected timestamp format. Timestamp format should be yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'. | Returned when the specified partition retention barrier does not conform to the expected timestamp format. |
AEM_SET_CHANGE_DATA_RETENTION_BARRIER_INNER_ERR |
Failed to set change data retention barrier for task {task} on server {server}. Message: {error_message} |
Returned when an error is encountered when trying to set the retention barrier. |