X-LightYear opened a new pull request, #4909: URL: https://github.com/apache/rocketmq-dashboard/pull/4909
## Summary - route unique-key message lookup through the selected instance provider - route queue-offset listing and offset message pulls through the selected instance provider - preserve the legacy fallback for blank instance ids and Apache behavior - return the existing unsupported-operation response instead of calling an unrelated Apache provider ## Root cause `MessageService.queryMessageByUniqueKey`, `getQueueOffsets`, and `pullMessageAtOffset` called the injected Apache `MessageProvider` directly. Unlike the neighboring message query and trace paths, they bypassed `InstanceProviderRegistry` even when a nonblank `instanceId` was supplied. This meant an Aliyun or Tencent instance could be handled by the Apache fallback client rather than the provider selected for that instance. ## Fix - add the three native message operations to the `InstanceProvider` SPI with the existing unsupported-operation convention - delegate the operations from `ApacheInstanceProvider` to the existing Apache message provider - resolve all three `MessageService` operations through `InstanceProviderRegistry` - keep blank-instance legacy fallback behavior unchanged Providers without a native implementation now return the existing HTTP 501 unsupported-operation response instead of being routed to Apache. ## Testing Pre-fix deterministic regression: - `mvn -Dtest=MessageServiceTest#instanceScopedMessageOperationsResolveTheSelectedProviderBeforeFallbackTest test` — failed with `Expecting code to raise a throwable`, proving the registry was bypassed Final validation: - `mvn -Dtest=MessageServiceTest,ApacheInstanceProviderTest,AliyunInstanceProviderTest,TencentInstanceProviderTest,InstanceProviderRegistryTest,GlobalExceptionHandlerTest,MessageQueryToolHandlerTest,MessageQueryByOffsetToolHandlerTest test` — 133 passed - Checkstyle — 0 violations - `mvn -DskipTests package` — passed - `git diff --check` — passed Negative-space assertions verify that the legacy fallback is not called for instance-scoped operations. Fixes #4908 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
