Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Dubbo 2.7.23 Consumer not consuming properly when provider custom extends Dispatcher #14661

Open
3 of 4 tasks
pudding0928 opened this issue Sep 11, 2024 · 2 comments
Open
3 of 4 tasks
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage

Comments

@pudding0928
Copy link

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • I had searched in the issues and found no similar issues.

Apache Dubbo Component

Java SPI Extensions (apache/dubbo-spi-extensions)

Dubbo Version

Dubbo Java 2.7.23,openJdk 1.11

Steps to reproduce this issue

1 CustomDispatcher implements Dispatcher and implements the related methods.
2 In the META-INF/dubbo directory, create a new file with the name org.apache.dubbo.remote.Dispatcher, with the content custom=com.xx.xx.CustomDispatcher
3 Call ProtocolConfig's setDispatcher method to set it to custom: protocolConfig.setDispatcher("custom")
4 start Provider sucessfully
5 When starting the consumer, it encounters the no provider error, and when tracing it through the debug, I found that when creating the NettyClient object, it calls org.apache.dubbo.remote.transport.dispatcher.ChannelHandlers#. wrapInternal -> ExtensionLoader.getExtensionLoader(Dispatcher.class)
.getAdaptiveExtension() can't find the class CustomDispatcher and gives error
PS: This error is not encountered when the Dispatcher's implementation class is changed to the built-in configuration.

What you expected to happen

The client-side Dispatcher should not be bound strictly and consistently to the server-side. If this is the case, there is no way to optimise the server-side Dispatcher schema when the client-side code is unable to make a task change that needs to be done

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

@pudding0928 pudding0928 added component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage labels Sep 11, 2024
@AlbumenJ
Copy link
Member

You'd better not to customize dispatcher

@pudding0928
Copy link
Author

You'd better not to customize dispatcher

thanks,I accept your suggestion. I just customize a dispatcher that extends MessageOnlyDispatcher and makes a few changes about RejectedExecutionException. It does't affect the main process of MessageOnlyDispatcher. So,how should I do? @AlbumenJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/need-triage Need maintainers to triage type/need-triage Need maintainers to triage
Projects
Status: Todo
Development

No branches or pull requests

2 participants