Skip to content

fix(studio): make DLQ provider fail explicitly instead of returning stub data - #750

Closed
123123213weqw wants to merge 1 commit into
apache:rocketmq-studiofrom
123123213weqw:fix/686-dlq-not-implemented
Closed

fix(studio): make DLQ provider fail explicitly instead of returning stub data#750
123123213weqw wants to merge 1 commit into
apache:rocketmq-studiofrom
123123213weqw:fix/686-dlq-not-implemented

Conversation

@123123213weqw

Copy link
Copy Markdown

Fixes #686

Problem

DLQProviderStub is wired as the production DLQProvider, but it:

  • returns hard-coded sample DLQ groups from listDLQGroups, and
  • treats resendMessages as a no-op (only logs, never resends).

Returning sample data and successful no-op responses can mislead operators into believing real DLQ groups exist and that resend requests actually succeeded.

Fix

Until a real DLQ provider is connected, both operations now fail explicitly with a structured 501 Not Implemented BusinessException (which GlobalExceptionHandler maps to a clean Result.error(501, ...) response), as the issue's "Expected" section calls for. The hard-coded stub data and its helper methods are removed.

DLQProviderStubTest is updated to assert the new not-implemented behavior.

Verification

mvn test -Dtest=DLQProviderStubTest passes on JDK 21: Tests run: 3, Failures: 0, Errors: 0, Skipped: 0.

Diff

2 files changed, +28 / -85.

…tub data

DLQProviderStub was wired as the production DLQProvider but returned
hard-coded sample DLQ groups and treated resendMessages as a no-op, which
could mislead operators into believing real DLQ data exists and that
resend requests succeeded.

Until a real DLQ provider is connected, both operations now fail explicitly
with a structured 501 Not Implemented BusinessException, matching the
issue's expected behavior. Updated DLQProviderStubTest accordingly.

Fixes apache#686
@lizhimins

Copy link
Copy Markdown
Member

Thanks for the contribution. This is already covered by #687, merged into rocketmq-studio as 31cb026: the hard-coded stub DLQ groups are gone and listDLQGroups / resendMessages now throw BusinessException(501, "DLQ provider is not configured"), with DLQProviderStubTest rewritten to assert that. #687 was opened first, so it was merged under first-come-first-served review order.

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.

2 participants