Skip to content

the priority of ServiceRouter and AppRouter were not effective #4822

@luoning810

Description

@luoning810
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.3
  • Operating System version: Mac OS
  • Java version: 1.8

Steps to reproduce this issue

1.RouterChain#buildChain(URL)
2.RouterChain#initWithRouters()
3.RouterChain#sort()

Expected Result

ServiceRouter is High priority than AppRouter

Actual Result

AppRouter is High priority than ServiceRouter

Cause by

the code was on ListenableRouter 94~96 line

public abstract class ListenableRouter extends AbstractRouter implements ConfigurationListener {    
    ......
    ......
    @Override
    public int getPriority() {
        return DEFAULT_PRIORITY;
    }

Resolve

i think can like this:

public abstract class ListenableRouter extends AbstractRouter implements ConfigurationListener {    
    ......
    ......
    @Override
    public int getPriority() {
        return priority;
    }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions