Skip to content

[Enhancement] Admin, RocketMQAdmin, StandaloneAdmin and AbstractRmqAdmin can be more clearer. #3897

@pandaapo

Description

@pandaapo

Search before asking

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

Enhancement Request

org.apache.eventmesh.api.admin.Admin
org.apache.eventmesh.storage.rocketmq.admin.RocketMQAdmin, AbstractRmqAdmin
org.apache.eventmesh.storage.standalone.admin.StandaloneAdmin

  1. AbstractRmqAdmin's field adminExt, is instantiated in the beginning, set to null at the end in every methods. So it loses the meaning as member field.
    Every calls of getAdminExt() will set member field nameServerAddr, clusterName to same value and execute some logic repetitively.

  2. AbstractRmqAdmin's code can be write in its only subclass RocketMQAdmin, then we can get more simple code structure.

  3. There are same field and methods in RocketMQAdmin and StandaloneAdmin as subclass of Admin.

Describe the solution you'd like

  1. Make adminExt be local variable. Make the creation logic of adminExt isolate.
  2. Merge AbstractRmqAdmin's code into RocketMQAdmin.
  3. Extract the shared field and method of RocketMQAdmin and StandaloneAdmin.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions