The receiver queue size in Pulsar is based on the number of messages, not the total size in bytes. For example, a receiver queue size of 1000 means the consumer can prefetch up to 1000 messages, regardless of their individual sizes. This is consistent across Pulsar clients and is documented in both the Java and C++ APIs, as well as in the official Pulsar documentation and code comments. The memory usage will increase with larger messages, but the queue limit itself is strictly by message count, not bytes (
ConsumerBuilder.java,
ConsumerConfigurationData.java,
pulsar-client-cpp,
Pulsar docs).
Would you like more detail on how this impacts memory usage or performance?
Sources:
-
ConsumerBuilder.java
-
ConsumerConfigurationData.java
-
pulsar-client-cpp
-
Pulsar docs 👍 0 button 👎 0 button 💡
Hint: Mention @runllm in the thread for followups.