[Enhancement] Do some code optimization.[consumer.go]
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 658
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 52
Description
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
### Enhancement Request
This issue is a subproject issue of eventmesh. the subproject address is:
https://github.com/apache/eventmesh-go


located at:
eventmesh-go/plugin/connector/rocketmq/consumer.go line 105,140,173,186,219
analysis and expalanation:
186-221 lines are duplicate of `plugin/connector/rocketmq/consumer.go:140-175` (dupl)
### Describe the solution you'd like
Ranme _

Repeat code extraction as method.


### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Contributor guide
Research direction
Start by reading eventmesh-go/plugin/connector/rocketmq/consumer.go, especially lines 140-221, and compare the repeated sections identified in the issue. Extract the duplicated logic into a method as described, then confirm the duplicate code is removed while the consumer behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100