rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

no check when change topicConfig by tools

Open keranbingaa opened this issue 7 years ago • 4 comments

BUG REPORT

  1. Please describe the issue you observed: There is no check when topicConfig is modified by tools, if readQueueNum is less than writeQueueNum, message may be sent to queues which consumers can't access.

  2. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc): Add check when modify topicConfig to fix this problem

keranbingaa avatar Sep 19 '19 09:09 keranbingaa

@keranbingaa This design is very useful in some situations. For example, when the queue expands and shrinks, it needs to consume the original queue and then consume the new queue, but new queues can be directly written to improve the write capability.

duhenglucky avatar Sep 20 '19 01:09 duhenglucky

@duhenglucky when the queue expands, it's more reasonble that we expand readQueue first, and then let consumer listen the queue, we expand writequeue finally, which can make messages consumed timely; when the queue shrinks, in order to avoid messages in queue which will be deleted not consumed, we should shrink writequeue to stop get new message, and then shrink readqueue. no matter expanding or shrinking, the writequeuenum will not be greater than readqueuenum.

keranbingaa avatar Sep 20 '19 03:09 keranbingaa

Do you think that extending and controlling the write queue (write>read) to delay consumption, stack messages, and block the consumption of a queue does not exist.

There is not enough evidence to enforce the constraint write<=read. Instead of limit, there is more flexibility and more scenes.

CodeIngL avatar Oct 09 '19 13:10 CodeIngL

close due to time too long

ShannonDing avatar Feb 22 '21 12:02 ShannonDing