Skip to content

SQS  >  Operations  >  start_message_move_task

start_message_move_task

Operation

start_message_move_task async

start_message_move_task(input: StartMessageMoveTaskInput, plugins: list[Plugin] | None = None) -> StartMessageMoveTaskOutput

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 queues that are configured as dead-letter queues (DLQs) of other Amazon SQS queues only. Non-SQS queue sources of dead-letter queues, such as Lambda or Amazon SNS topics, are currently not supported.

  • In dead-letter queues redrive context, the StartMessageMoveTask the source queue is the 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.

  • Only one active message movement task is supported per queue at any given time.

Parameters:

Name Type Description Default
input StartMessageMoveTaskInput

An instance of StartMessageMoveTaskInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
StartMessageMoveTaskOutput

An instance of StartMessageMoveTaskOutput.

Input

StartMessageMoveTaskInput dataclass

Dataclass for StartMessageMoveTaskInput structure.

Attributes

destination_arn class-attribute instance-attribute
destination_arn: str | None = None

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.

max_number_of_messages_per_second class-attribute instance-attribute
max_number_of_messages_per_second: int | None = None

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.

source_arn class-attribute instance-attribute
source_arn: str | None = None

The ARN of the queue that contains the messages to be moved to another queue. Currently, only ARNs of dead-letter queues (DLQs) whose sources are other Amazon SQS queues are accepted. DLQs whose sources are non-SQS queues, such as Lambda or Amazon SNS topics, are not currently supported.

Output

StartMessageMoveTaskOutput dataclass

Dataclass for StartMessageMoveTaskOutput structure.

Attributes

task_handle class-attribute instance-attribute
task_handle: str | None = None

An identifier associated with a message movement task. You can use this identifier to cancel a specified message movement task using the CancelMessageMoveTask action.