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] Not yet make full use of Polymorphism in Producer and AbstractProducer. #3861

Open
2 tasks done
pandaapo opened this issue May 3, 2023 · 1 comment · May be fixed by #3867
Open
2 tasks done

[Enhancement] Not yet make full use of Polymorphism in Producer and AbstractProducer. #3861

pandaapo opened this issue May 3, 2023 · 1 comment · May be fixed by #3867
Labels
enhancement New feature or request Stale

Comments

@pandaapo
Copy link
Member

pandaapo commented May 3, 2023

Search before asking

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

Enhancement Request

  • In storage modules of knative, rocketmq, pulsar, kafka, the model of Producer's hierarchy is not unified and confused: 3 AbstractProducers in module knative, rocketmq, pulsar have some similar contents, but some implement Producer and some not. Even AbstractProducer in kafka is not been designed into Producer's hierarchy.
  • InterruptedException should never be ignored. Or the import interrupted state of Thread may be ignored unexpected.
  • Some logic has been provided by existing util, so no need to code again.
  • Smaller synchronized scope, lower the thread competitiveness
  • In AtomicXxx, set() is thread safe and better than CAS when no need to get a return value.

Describe the solution you'd like

  • Unify the model of Producer's hierarchy: Rename 3 AbstractProducer in module knative, rocketmq to KnativeAbstractProducer, RocketmqAbstractProducer. Add a AbstractProducer in api module implements Producer. Make AbstractProducers in module knative, kafka, rocketmq, pulsar all extends AbstractProducer in api module or its sub abstract class. Remove AbstractProducer in module pulsar.
  • Catch InterruptedException and call interrupt() of current Thread.
  • Use existing util.
  • Minimize synchronized scope.
  • Use set replace CAS where no need get a return value.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
Copy link
Contributor

It has been 90 days since the last activity on this issue. Apache EventMesh values the voices of the community. Please don't hesitate to share your latest insights on this matter at any time, as the community is more than willing to engage in discussions regarding the development and optimization directions of this feature.

If you feel that your issue has been resolved, please feel free to close it. Should you have any additional information to share, you are welcome to reopen this issue.

@github-actions github-actions bot added the Stale label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Stale
Projects
None yet
1 participant