flowchartsman edited a comment on issue #9123:
URL: https://github.com/apache/pulsar/issues/9123#issuecomment-754336527


   @wolfstudy @sijie I believe it was just an issue of a missing nil check for 
non-sink functions, since the purpose of the code in the first place seems to 
check for a configured `BatchBuilder` and then setting the new Producer's batch 
builder to use it. That said, now that I look at it more closely, I'm 
relatively concerned with the number of log messages indicating a new producer 
server-side for each message. Is this okay and, if so, is there any way we can 
suppress these? Seems like potentially a lot of memory pressure to be 
allocating new producers for the same topic for every message just to throw 
them away, though.
   
   ```
   01:54:38.326 [ForkJoinPool.commonPool-worker-3] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] Created new 
producer: 
Producer{topic=PersistentTopic{topic=persistent://public/default/test}, 
client=/127.0.0.1:35876, producerName=standalone-0-3743, producerId=874}
   01:54:39.335 [pulsar-io-50-8] INFO  
org.apache.pulsar.broker.service.ServerCnx - 
[/127.0.0.1:35876][persistent://public/default/test] Creating producer. 
producerId=875
   01:54:39.336 [ForkJoinPool.commonPool-worker-2] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] 
persistent://public/default/test configured with schema false
   01:54:39.336 [ForkJoinPool.commonPool-worker-2] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] Created new 
producer: 
Producer{topic=PersistentTopic{topic=persistent://public/default/test}, 
client=/127.0.0.1:35876, producerName=standalone-0-3744, producerId=875}
   01:54:40.300 [pulsar-io-50-8] INFO  
org.apache.pulsar.broker.service.ServerCnx - 
[/127.0.0.1:35876][persistent://public/default/test] Creating producer. 
producerId=876
   01:54:40.301 [ForkJoinPool.commonPool-worker-6] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] 
persistent://public/default/test configured with schema false
   01:54:40.301 [ForkJoinPool.commonPool-worker-6] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] Created new 
producer: 
Producer{topic=PersistentTopic{topic=persistent://public/default/test}, 
client=/127.0.0.1:35876, producerName=standalone-0-3745, producerId=876}
   01:54:41.300 [pulsar-io-50-8] INFO  
org.apache.pulsar.broker.service.ServerCnx - 
[/127.0.0.1:35876][persistent://public/default/test] Creating producer. 
producerId=877
   01:54:41.301 [ForkJoinPool.commonPool-worker-3] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] 
persistent://public/default/test configured with schema false
   01:54:41.301 [ForkJoinPool.commonPool-worker-3] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] Created new 
producer: 
Producer{topic=PersistentTopic{topic=persistent://public/default/test}, 
client=/127.0.0.1:35876, producerName=standalone-0-3746, producerId=877}
   01:54:42.300 [pulsar-io-50-8] INFO  
org.apache.pulsar.broker.service.ServerCnx - 
[/127.0.0.1:35876][persistent://public/default/test] Creating producer. 
producerId=878
   01:54:42.301 [ForkJoinPool.commonPool-worker-6] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] 
persistent://public/default/test configured with schema false
   01:54:42.301 [ForkJoinPool.commonPool-worker-6] INFO  
org.apache.pulsar.broker.service.ServerCnx - [/127.0.0.1:35876] Created new 
producer: 
Producer{topic=PersistentTopic{topic=persistent://public/default/test}, 
client=/127.0.0.1:35876, producerName=standalone-0-3747, producerId=878}
   01:54:43.300 [pulsar-io-50-8] INFO  
org.apache.pulsar.broker.service.ServerCnx - 
[/127.0.0.1:35876][persistent://public/default/test] Creating producer. 
producerId=879
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to