DEFER Command
Syntax
Parameters
Parameter | Description | Required | Example |
---|---|---|---|
CLIENT_ID | ID of the client deferring the event | Yes |
|
EVENT_IDEM | Unique ID of the event to defer | Yes |
|
EVENT_NAME | Type of event being deferred | Yes |
|
DELAY | Time in milliseconds to delay processing | No |
|
PRIORITY | Priority level (1-5, where 5 is highest) | No |
|
REASON | Reason for deferring the event | No |
|
If DELAY
is not specified, it defaults to 60000 milliseconds (60 seconds).
If PRIORITY
is not specified, it defaults to 1.
Response
Success
The response includes:
IDEM
: The ID of the deferred eventDELIVERY_TIME
: The timestamp when the event will be delivered (in milliseconds since epoch)
Error
Examples
Basic Deferral
With Priority
Short Retry
Notes
Deferred events are stored with their delivery time as a score in a sorted set
When the delay period expires, events are automatically moved back to the pending queue
Events maintain their specified priority level throughout the deferral period
The system uses a background process to periodically check for events that are ready for delivery
Only the client that is currently processing an event can defer it