[Enhancement] EventListener defines in the level of Consumer may be more proper instead of the level of topic #780
Closed
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
inConsumer.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
inConsumer.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!