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

sentinel-apache-dubbo-adapter dubbo2.7.5 ERROR #1231

Closed
bxvs888 opened this issue Jan 6, 2020 · 6 comments · Fixed by #1296
Closed

sentinel-apache-dubbo-adapter dubbo2.7.5 ERROR #1231

bxvs888 opened this issue Jan 6, 2020 · 6 comments · Fixed by #1296
Labels
area/integrations Issues or PRs related to integrations with open-source components good first issue Good for newcomers

Comments

@bxvs888
Copy link

bxvs888 commented Jan 6, 2020

Issue Description

Type: bug report or feature request

Describe what happened (or what feature you want)

Describe what you expected to happen

How to reproduce it (as minimally and precisely as possible)

Tell us your environment

Anything else we need to know?

没有实现dubbo 2.7.5 onmessage方法。

@sczyh30 sczyh30 added the area/integrations Issues or PRs related to integrations with open-source components label Jan 6, 2020
@sczyh30
Copy link
Member

sczyh30 commented Jan 6, 2020

@sczyh30
Copy link
Member

sczyh30 commented Jan 6, 2020

@CodingSinger Any good suggestions?

@zhaoyuguang
Copy link
Collaborator

一个简单的临时建议
Override只是源码注解 如果方法声明与父类那一样会重写
是否可以把改为实现改成

    static class SentinelDubboListener implements Listener {

        public void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation) {
            onSuccess(appResponse, invoker);
        }

        public void onMessage(Result appResponse, Invoker<?> invoker, Invocation invocation) {
            onSuccess(appResponse, invoker);
        }

        private void onSuccess(Result appResponse, Invoker<?> invoker) {
            if (DubboConfig.getDubboBizExceptionTraceEnabled()) {
                traceAndExit(appResponse.getException(), invoker.getUrl());
            } else {
                traceAndExit(null, invoker.getUrl());
            }
        }

        @Override
        public void onError(Throwable t, Invoker<?> invoker, Invocation invocation) {
            traceAndExit(t, invoker.getUrl());
        }
    }

另一个是:看起来dubbo官方推荐实现org.apache.dubbo.rpc.Filter.Listener

@sczyh30 sczyh30 added the good first issue Good for newcomers label Jan 15, 2020
@jasonjoo2010
Copy link
Collaborator

I don't know why 2.7.5 has so many compatibility issues and we all know a declaration should not be removed without several versions' deprecation especially for interface.

My suggestion is that just ignore it because of apache/dubbo#5639

@sczyh30
Copy link
Member

sczyh30 commented Feb 18, 2020

Though Dubbo is fixing the compatibility in later versions, we may need to adapt to the 2.7.5. #1231 (comment) seems like a good idea for a temporary fix.

@zhaoyuguang
Copy link
Collaborator

Though Dubbo is fixing the compatibility in later versions, we may need to adapt to the 2.7.5. #1231 (comment) seems like a good idea for a temporary fix.

Okay, 我来修复下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/integrations Issues or PRs related to integrations with open-source components good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants