v1

latestOpenAPI 3.0.1Apache License 2.02026-07-17231129.6 KB
promises

Get a promise by the unique ID of its target task

get/topics/{topic}/promises/{id}

Path parameters

topicstring required

Name of the topic

idstring required

Unique ID of the target task

Response

OK

_idstring

Unique ID of the promise, which is the same as the target task ID. A promise with an empty ID is considered an "wildcard promise", and Ratus will assign an appropriate task based on the status of the queue. A task can only be owned by a single promise at a given time.

consumerstring

Identifier of the consumer instance who consumed the task.

deadlinestring

The deadline for the completion of execution promised by the consumer. Consumer code needs to commit the task before this deadline, otherwise the task is determined to have timed out and will be reset to the "pending" state, allowing other consumers to retry.

timeoutstring

Timeout duration for task execution promised by the consumer. When the absolute deadline time is specified, the deadline will take precedence. It is recommended to use relative durations whenever possible to avoid clock synchronization issues. The value must be a valid duration string parsable by time.ParseDuration. This field is only used when creating a promise and will be cleared after converting to an absolute deadline.