RapperCL opened a new issue, #5232:
URL: https://github.com/apache/rocketmq/issues/5232

   now,rocketmq provides 6 different allocation strategies,Use the 
AllocateMessageQueueAveragely strategy by default;
   Not so good for the use of strategies:
   1 Hardcoded as the default AllocateMessageQueueAveragely policy;
   org.apache.rocketmq.client.consumer.DefaultMQPushConsumer
   <img width="1200" alt="image" 
src="https://user-images.githubusercontent.com/44110731/193049441-b8c18ecd-cceb-41f6-ae14-dfc6fd58195f.png";>
   org.apache.rocketmq.client.consumer.DefaultLitePullConsumer
   <img width="1266" alt="image" 
src="https://user-images.githubusercontent.com/44110731/193049733-9ae4182c-5a8d-4a20-8126-c27a1ecc9f7f.png";>
   
   2 Difficult to switch 
   If the user wants to modify other policies, then the user needs to modify 
the source code,If the user wants to modify other strategies, then the user 
needs to modify the source code, usually through the 
setAllocateMessageQueueStrategy method
   <img width="1288" alt="image" 
src="https://user-images.githubusercontent.com/44110731/193050273-f575129d-f0c7-42ec-9874-2ca399d0ba73.png";>
   
   3 Difficult to expand
     If users want to implement their own allocation strategy, they also need 
to modify the source code
   
   I want to know why it is not implemented through the spi mechanism here?
     This avoids hard coding and improves usability and scalability.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to