SQS / Client / start_message_move_task
start_message_move_task#
- SQS.Client.start_message_move_task(**kwargs)#
Starts an asynchronous task to move messages from a specified source queue to a specified destination queue.
Note
This action is currently limited to supporting message redrive from dead-letter queues (DLQs) only. In this context, the source queue is the dead-letter queue (DLQ), while the destination queue can be the original source queue (from which the messages were driven to the dead-letter-queue), or a custom destination queue.
Currently, only standard queues are supported.
Only one active message movement task is supported per queue at any given time.
See also: AWS API Documentation
Request Syntax
response = client.start_message_move_task( SourceArn='string', DestinationArn='string', MaxNumberOfMessagesPerSecond=123 )
- Parameters:
SourceArn (string) –
[REQUIRED]
The ARN of the queue that contains the messages to be moved to another queue. Currently, only dead-letter queue (DLQ) ARNs are accepted.
DestinationArn (string) – The ARN of the queue that receives the moved messages. You can use this field to specify the destination queue where you would like to redrive messages. If this field is left blank, the messages will be redriven back to their respective original source queues.
MaxNumberOfMessagesPerSecond (integer) – The number of messages to be moved per second (the message movement rate). You can use this field to define a fixed message movement rate. The maximum value for messages per second is 500. If this field is left blank, the system will optimize the rate based on the queue message backlog size, which may vary throughout the duration of the message movement task.
- Return type:
dict
- Returns:
Response Syntax
{ 'TaskHandle': 'string' }
Response Structure
(dict) –
TaskHandle (string) –
An identifier associated with a message movement task. You can use this identifier to cancel a specified message movement task using the
CancelMessageMoveTask
action.
Exceptions
SQS.Client.exceptions.ResourceNotFoundException
SQS.Client.exceptions.UnsupportedOperation