Skip to main content

Reject

A task can raise this if it wants to reject/re-queue the message.

Attributes​

AttributeTypeDescription
reasonstringThe explanation or cause for rejecting the task, used for logging and debugging purposes.
requeuebooleanA boolean flag determining whether the rejected message should be placed back into the queue for retry.

Constructor​

Signature​

def Reject(
reason: Any = None,
requeue: boolean = False
) - > null

Parameters​

NameTypeDescription
reasonAny = NoneThe reason for rejecting the message.
requeueboolean = FalseWhether the message should be re-queued.

Signature​

def Reject(
reason: string = None,
requeue: boolean = False
) - > null

Parameters​

NameTypeDescription
reasonstring = NoneThe explanation or error message detailing why the task is being rejected.
requeueboolean = FalseA flag indicating whether the message should be returned to the queue for another worker to process.