pulsar-client-node icon indicating copy to clipboard operation
pulsar-client-node copied to clipboard

Thousands of producers are getting created

Open goku321 opened this issue 5 years ago • 3 comments

Hi, I'm using node pulsar client to publish messages on a partitioned pulsar topic with 100 partitions. I'm spawning 20 node processes and reusing the same producer(I'm not closing the producer) that means there should be only 20 producers. But, when I see topic stats it shows a lot of producers (in thousands). What I'm doing wrong? Also, is there a difference b/w a producer and a publisher?

goku321 avatar May 29 '20 11:05 goku321

@goku321 Since you are using a partitioned topic with 100 partitions, you will have 100 sub-producers when constructing one producer. If you create 20 producers, you will have ~2000 producers. Is this the behavior you are seeing?

sijie avatar Jun 01 '20 01:06 sijie

@sijie I'm actually seeing more producers than 2000. Attaching the screenshot: image

goku321 avatar Jun 01 '20 04:06 goku321

@goku321 Can you run pulsar-admin topics stats to get the topic stats of a given topic partition?

sijie avatar Jun 01 '20 23:06 sijie