3

In RocketMQ the number of readQueue and number of writeQueue could be set separately, and it seems to me only the common part could work as expected.

For example, if readQueueNum is set to 8 and writeQueueNum is set to 16, half of the messages is simply not handled.

I tried to find out what's the rationale about this design in the code but find no clue yet. Could someone help explain ? thx

fankai
  • 128
  • 1
  • 8

2 Answers2

3

if there are too many messages in one topic, you need to increase queues, and keep service going with no loss for any message, what will you do? reduce queues is the same?

RocketMQ give us some ways, let's take your case for an example, increase queues to 8:

  • increase read queues to 8. what will happens? read message from 8 queue, write to 4
  • increase write queue to 8. messages wrote to 4 new queues can read immediately right?

question: if no read-write queues, increase queue directly, new messages to new queues must not read immediately

francis
  • 161
  • 8
0

It's use for decreasing queues gracefully. Imaging how can you decrease your write queues without losing messages. First you must decrease write queues, then you can decrese read queues after consuming history messages in old write queues.