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

[Enhancement] optimize code to reduce almost same code for updating client and subscription in different processor #2852

Closed
2 tasks done
wqliang opened this issue Jan 7, 2023 · 0 comments · Fixed by #2856
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@wqliang
Copy link
Contributor

wqliang commented Jan 7, 2023

Search before asking

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

Enhancement Request

There are almost same code for updating client infos and subscriptions in org.apache.eventmesh.runtime.core.protocol.http.processor.LocalSubscribeEventProcessor and org.apache.eventmesh.runtime.core.protocol.http.processor.SubscribeProcessor.

In deatils,

  • the local method registerClient in both Processor
  • the code in SubscribeProcessor(line192-263) and LocalSubscribeEventProcessor(line176-247)

It is better to manage the code to "update client info" and "update subscription info" in the same code block or a manager.

Describe the solution you'd like

Maybe we can:
step1: add a manager to manage client info and subscription, for example SubscriptionManager;
step2: consider wether we can combine consumerManager and SubscriptionManager together to manager all info in consumer side.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@wqliang wqliang added the enhancement New feature or request label Jan 7, 2023
@wqliang wqliang self-assigned this Jan 8, 2023
@xwm1992 xwm1992 added this to the 1.8.0 milestone Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants