-
How many consumers or producers can be created on a pulsar client? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In the Java implementation the I have seen a client application open 30K concurrent consumers to one single topic (wasn't by design, it was a poorly coded application.) Neither the client nor the broker actually crashed in that instance. The only ill effects I observed on the broker were the prometheus metrics collection stopping because it had Since connection management/pooling is handled at the Since Pulsar Producer and Consumer instances are thread-safe and highly tunable, in general you shouldn't have to create a lot of them to get high performance. Generally speaking you only need to create many instances if you need to interact with many different topics. |
Beta Was this translation helpful? Give feedback.
-
The issue had no activity for 30 days, mark with Stale label. |
Beta Was this translation helpful? Give feedback.
In the Java implementation the
PulsarClient
class stores producer and consumer instances in a set backed by aConcurrentHashMap
so the count is theoretically unbounded I guess. In practice everything has a limit but it's dependent on your system resources.I have seen a client application open 30K concurrent consumers to one single topic (wasn't by design, it was a poorly coded application.) Neither the client nor the broker actually crashed in that instance. The only ill effects I observed on the broker were the prometheus metrics collection stopping because it had
exposeConsumerLevelMetricsInPrometheus=true
and the broker could not render all the metrics before prometheus scrape timed o…