Skip to content

Delegate ReDrive APIs to the underlying SQS client#178

Open
stefan-sq wants to merge 1 commit into
awslabs:masterfrom
stefan-sq:stefan/fix-v2-move-message-task
Open

Delegate ReDrive APIs to the underlying SQS client#178
stefan-sq wants to merge 1 commit into
awslabs:masterfrom
stefan-sq:stefan/fix-v2-move-message-task

Conversation

@stefan-sq
Copy link
Copy Markdown

@stefan-sq stefan-sq commented Apr 24, 2026

Issue

AmazonSQSExtendedClientBase and AmazonSQSExtendedAsyncClientBase do not override startMessageMoveTask, listMessageMoveTasks, or cancelMessageMoveTask. Calls fall through to the SqsClient / SqsAsyncClient interface default methods, which throw UnsupportedOperationException, breaking DLQ redrive for any consumer that wraps an SQS client with the extended client for S3 payload offloading.

Reproduction

SqsAsyncClient extended = new AmazonSQSExtendedAsyncClient(
    SqsAsyncClient.create(),
    new ExtendedAsyncClientConfiguration().withPayloadSupportEnabled(s3, bucket));

extended.startMessageMoveTask(r -> r.sourceArn(dlqArn)).join();
// java.lang.UnsupportedOperationException: startMessageMoveTask

Fix

Add plain delegating overrides in both base classes. These server-side move operations don't interact with message payloads, so no extended-client-specific handling is required.

Prior art

This mirrors the equivalent fix landed for the v1 SDK branch in f0959cb.

Tests

Added one delegation test per method in both AmazonSQSExtendedClientTest and AmazonSQSExtendedAsyncClientTest. All 94 tests pass locally.

AmazonSQSExtendedClientBase and AmazonSQSExtendedAsyncClientBase did
not override startMessageMoveTask, listMessageMoveTasks, or
cancelMessageMoveTask. Calls fell through to the SqsClient /
SqsAsyncClient interface default methods, which throw
UnsupportedOperationException, breaking DLQ redrive for any consumer
that wraps an SQS client with the extended client (for S3 payload
offloading).

These operations move, list, and cancel server-side message move
tasks between queues; they do not interact with message payloads, so
no extended-client-specific handling is required — plain delegation
is sufficient.

This mirrors the fix landed for the v1 SDK branch in:
awslabs@f0959cb
@stefan-sq stefan-sq marked this pull request as ready for review April 24, 2026 14:20
@stefan-sq
Copy link
Copy Markdown
Author

cc: @mit-aws, @ziyanli-amazon, @jagdev-aws, I see you all have approved some of the most recently merged PRs, hope someone can take a look here, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant