You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ni-ze (via GitHub)" <gi...@apache.org> on 2023/04/01 11:42:00 UTC
[GitHub] [rocketmq] ni-ze opened a new issue, #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
ni-ze opened a new issue, #6525:
URL: https://github.com/apache/rocketmq/issues/6525
The issue tracker is used for bug reporting purposes **ONLY** whereas feature request needs to follow the [RIP process](https://github.com/apache/rocketmq/wiki/RocketMQ-Improvement-Proposal). To avoid unnecessary duplication, please check whether there is a previous issue before filing a new one.
It is recommended to start a discussion thread in the [mailing lists](http://rocketmq.apache.org/about/contact/) or [github discussions](https://github.com/apache/rocketmq/discussions) in cases of discussing your deployment plan, API clarification, and other non-bug-reporting issues.
We welcome any friendly suggestions, bug fixes, collaboration, and other improvements.
Please ensure that your bug report is clear and self-contained. Otherwise, it would take additional rounds of communication, thus more time, to understand the problem itself.
Generally, fixing an issue goes through the following steps:
1. Understand the issue reported;
1. Reproduce the unexpected behavior locally;
1. Perform root cause analysis to identify the underlying problem;
1. Create test cases to cover the identified problem;
1. Work out a solution to rectify the behavior and make the newly created test cases pass;
1. Make a pull request and go through peer review;
As a result, it would be very helpful yet challenging if you could provide an isolated project reproducing your reported issue. Anyway, please ensure your issue report is informative enough for the community to pick up. At a minimum, include the following hints:
**BUG REPORT**
1. Please describe the issue you observed:
ConsumeQueue BatchConsumeQueue and SparseConsumeQueue implement interface FileQueueLifeCycle and FileQueueLifeCycle, so the fellow convert will not throw ClassCastException. However, It better to prevent from grammatical level.

```java
public interface ConsumeQueueInterface extends FileQueueLifeCycle{
...
}
```
- What did you do (The steps to reproduce)?
- What is expected to see?
- What did you see instead?
2. Please tell us about your environment:
3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):
**FEATURE REQUEST**
1. Please describe the feature you are requesting.
2. Provide any additional detail on your proposed use case for this feature.
3. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
4. If there are some sub-tasks involved, use -[] for each sub-task and create a corresponding issue to map to the sub-task:
- [sub-task1-issue-number](example_sub_issue1_link_here): sub-task1 description here,
- [sub-task2-issue-number](example_sub_issue2_link_here): sub-task2 description here,
- ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] AbhishekKumar2244 commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "AbhishekKumar2244 (via GitHub)" <gi...@apache.org>.
AbhishekKumar2244 commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493236129
we've modified the FileQueueLifeCycle class to include a start() and stop() method, which are currently duplicated in the ConsumeQueueInterface class. We've also modified the ConsumeQueueInterface class to extend the FileQueueLifeCycle class, which means that it will inherit these methods and any other methods that are defined in FileQueueLifeCycle.
Benefits: By refactoring the code in this way, we can avoid duplication of code, reduce maintenance costs, and create a more modular and flexible code base. Additionally, this change makes it easier to add new functionality to the FileQueueLifeCycle class without having to update the ConsumeQueueInterface class separately. This can result in a more stable and reliable code base over time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Abhijeetmishr commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "Abhijeetmishr (via GitHub)" <gi...@apache.org>.
Abhijeetmishr commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1494304589
@ni-ze we are typecasting here
```
private FileQueueLifeCycle getLifeCycle(String topic, int queueId) {
return (FileQueueLifeCycle) findOrCreateConsumeQueue(topic, queueId);
}
```
but interface is not extending FileQueueLifeCycle.
So it will throw typecast error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Abhijeetmishr commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "Abhijeetmishr (via GitHub)" <gi...@apache.org>.
Abhijeetmishr commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493244826
> @Abhijeetmishr Sure.
working on it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Abhijeetmishr commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "Abhijeetmishr (via GitHub)" <gi...@apache.org>.
Abhijeetmishr commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1492971839
@ni-ze can I take this issue ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] AbhishekKumar2244 commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "AbhishekKumar2244 (via GitHub)" <gi...@apache.org>.
AbhishekKumar2244 commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493236005
public abstract class FileQueueLifeCycle {
// Existing functionality that was previously duplicated in ConsumeQueueInterface
public void start() {
// Start the file queue lifecycle
}
public void stop() {
// Stop the file queue lifecycle
}
// Additional functionality that may be required
}
public interface ConsumeQueueInterface extends FileQueueLifeCycle {
// Existing functionality that was previously in ConsumeQueueInterface
// No need to redefine any methods already defined in FileQueueLifeCycle
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] ni-ze commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "ni-ze (via GitHub)" <gi...@apache.org>.
ni-ze commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493199357
@Abhijeetmishr Sure.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] AbhishekKumar2244 commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "AbhishekKumar2244 (via GitHub)" <gi...@apache.org>.
AbhishekKumar2244 commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493235484
Hi ,
My name is Abhishek kumar and I'm pursing my B.Tech from Guru Gobind singh Indraprastha University. I am eager to learn new things and more about open-source projects. I am interested in this project and looking forward for contributing to it.
Please guide me, How do I start?
Thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] AbhishekKumar2244 commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "AbhishekKumar2244 (via GitHub)" <gi...@apache.org>.
AbhishekKumar2244 commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493235200
Hi ,
My name is Abhishek kumar and I'm pursing my B.Tech from Guru Gobind Singh Indraprashta. I am eager to learn new things and more about open-source projects. I am interested in this project and looking forward for contributing to it.
Please guide me, How do I start?
Thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Abhijeetmishr commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "Abhijeetmishr (via GitHub)" <gi...@apache.org>.
Abhijeetmishr commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1494350635
@ni-ze @Oliverwqcwrw Please review this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] AbhishekKumar2244 commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "AbhishekKumar2244 (via GitHub)" <gi...@apache.org>.
AbhishekKumar2244 commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493235884
One possible solution to this issue is to refactor the code so that the ConsumeQueueInterface class extends the FileQueueLifeCycle class. This would allow the ConsumeQueueInterface class to inherit all of the functionality of the FileQueueLifeCycle class, and avoid the need for duplicated code.
Implementation: To implement this solution, we would first modify the FileQueueLifeCycle class to include any methods or functionality that are currently duplicated in the ConsumeQueueInterface class. We would then modify the Consume QueueInterface class to extend the File Queue Life Cycle class, so that it can inherit this functionality.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] Abhijeetmishr commented on issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "Abhijeetmishr (via GitHub)" <gi...@apache.org>.
Abhijeetmishr commented on issue #6525:
URL: https://github.com/apache/rocketmq/issues/6525#issuecomment-1493244934
> One possible solution to this issue is to refactor the code so that the ConsumeQueueInterface class extends the FileQueueLifeCycle class. This would allow the ConsumeQueueInterface class to inherit all of the functionality of the FileQueueLifeCycle class, and avoid the need for duplicated code.
>
> Implementation: To implement this solution, we would first modify the FileQueueLifeCycle class to include any methods or functionality that are currently duplicated in the ConsumeQueueInterface class. We would then modify the Consume QueueInterface class to extend the File Queue Life Cycle class, so that it can inherit this functionality.
Thank you for suggestion working on it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [rocketmq] ni-ze closed issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
Posted by "ni-ze (via GitHub)" <gi...@apache.org>.
ni-ze closed issue #6525: Make ConsumeQueueInterface extends from FileQueueLifeCycle
URL: https://github.com/apache/rocketmq/issues/6525
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org