Skip to content

[question]How many consumers or producers can be created on a pulsar client? #20103

Answered by wmccarley
xuesongxs asked this question in Q&A
Discussion options

You must be logged in to vote

In the Java implementation the PulsarClient class stores producer and consumer instances in a set backed by a ConcurrentHashMap 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…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by visortelle
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
deprecated/question Questions should happened in GitHub Discussions
3 participants
Converted from issue

This discussion was converted from issue #11227 on April 14, 2023 09:06.