<@U078Y59KC3B> I have about 40 instances of pulsar...
# ask-ai
s
@RunLLM I have about 40 instances of pulsar function deployed in kubernetes reading from a topic. Only some of these functions are getting data from topic. Is there any related config to allow more consumers to read from topic
r
To allow more consumers to read from a topic in Apache Pulsar, you should ensure that the subscription type and configuration are set correctly. If you are using a shared subscription, multiple consumers can attach to the same subscription, and messages are distributed in a round-robin fashion across consumers. This setup allows multiple consumers to read from the same topic simultaneously. 1. Subscription Type: Ensure that the subscription type is set to
Shared
or
Key_Shared
. These subscription types allow multiple consumers to read from the same topic. The
Shared
subscription type distributes messages across consumers without guaranteeing order, while
Key_Shared
maintains order for messages with the same key. 2. Consumer Configuration: Check the consumer configuration to ensure that the
receiverQueueSize
is set appropriately. A larger queue size can help improve throughput by allowing more messages to be prefetched and processed concurrently. 3. Function Configuration: If you are using Pulsar Functions, ensure that the function's parallelism is set correctly. The parallelism setting determines how many instances of the function can run concurrently, which can affect how messages are processed. If you need more detailed guidance on configuring these settings, please let me know. Sources: - Apache Pulsar Concepts - Subscription Types 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.