EnSync Engine Documentation Help

ACK Command

Syntax

ACK;CLIENT_ID=client_id;EVENT_IDEM=unique_id;EVENT_NAME=event_type;PARTITION_BLOCK=block_number

Parameters

Parameter

Description

Required

Example

CLIENT_ID

ID of the client acknowledging the event

Yes

client-123abc

EVENT_IDEM

Unique ID of the event to acknowledge

Yes

evt_12345abcde

EVENT_NAME

Type of event being acknowledged

Yes

user/profile/updated

PARTITION_BLOCK

Partition block of the event

Yes

19345

Response

Success

+PASS:ACKNOWLEDGED;IDEM=evt_12345abcde

The response includes the ID of the acknowledged event.

Error

-FAIL:MISSING_PARAMETERS;MESSAGE=Missing required acknowledgment data. Ensure CLIENT_ID, EVENT_IDEM, EVENT_NAME, and PARTITION_BLOCK are passed
-FAIL:NOT_FOUND;MESSAGE=Event not found in processing queue
-FAIL:UNAUTHORIZED;MESSAGE=Client is not authorized to acknowledge this event

Examples

Basic Acknowledgment

ACK;CLIENT_ID=client-123abc;EVENT_IDEM=evt_12345abcde;EVENT_NAME=user/profile/updated;PARTITION_BLOCK=19345

Notes

  • The ACK command confirms successful processing of an event

  • Acknowledged events are removed from the client's processing queue

  • The client's position in the event stream is updated in persistent storage

  • Acknowledgment may trigger queue refill operations when thresholds are reached

  • The system implements a two-phase acknowledgment process:

    1. First mark the event as acknowledged in Valkey (Redis)

    2. Then update the client position in the database

  • Only the client that is currently processing an event can acknowledge it

  • The PARTITION_BLOCK parameter is used for efficient database queries when updating client position

Last modified: 07 October 2025