Skip to content

[Enhancement] EventListener defines in the level of Consumer may be more proper instead of the level of topic #780

Closed
@lrhkobe

Description

Search before asking

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

Enhancement Request

The eventListner in Consumer.java may be more proper if defined in the level of Consumer,instead of the level of Topic. Because the logic of eventListener is same for each topic in EventMesh.

void subscribe(String topic, final EventListener listener);

Describe the solution you'd like

  • modify method subscribe in Consumer.java, delete the binding between topic and eventListener
  //void subscribe(String topic, final EventListener listener) throws Exception;

    void subscribe(String topic) throws Exception;
  • add method registerEventListener in Consumer.java , regist eventListener and store it in the level of Consumer
    void registerEventListener(EventListener listener);

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

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