In RocketMQ, the number of queues directly affects the upper limit of the number of consumer instances, which equals to the number of queues in the same consumer group. For cluster consumption, you need to set the number of queues.
Queues can be distributed across brokers and are the foundation of RocketMQ. Queues are distributed among brokers to use the resources, including storage and I/O resources on the brokers. In general, a queue occupying a larger proportion of a broker consumers more resources of the broker. Queues distributed to more brokers enjoy bigger storage space and better performance. If the broker's machine has unbalanced performance, you can adjust the number of queues for resource tuning.
In the Push consumption mode, the API pre-pulls 1,000 messages for each queue by default. If the number of queues or the package body of a single message is too large, you can reduce the number of pre-pulls to prevent memory overflow caused by excessive pre-pulls.