szkoludasebastian commented on issue #22709:
URL: https://github.com/apache/pulsar/issues/22709#issuecomment-2111983007

   Here is our configuration for pulsar client (in comments I put values):
   ```
   public PulsarClient createPulsarClient(ClientBuilder pulsarClientBuilder, 
PulsarClientProperties properties) throws PulsarClientException {
           return pulsarClientBuilder
                   .serviceUrl(properties.getProxyUrl()) 
//pulsar://localhost:6650
                   .ioThreads(properties.getHandlingBrokersConnectionThreads()) 
//10
                   .listenerThreads(properties.getListenerThreads()) //1
                   
.connectionsPerBroker(properties.getMaxConnectionsPerBroker()) //10
                   
.connectionTimeout(parseDurationToSeconds(properties.getConnectionTimeout()), 
TimeUnit.SECONDS) //PT30S
                   
.operationTimeout(parseDurationToSeconds(properties.getOperationTimeout()), 
TimeUnit.SECONDS) //PT30S
                   
.statsInterval(parseDurationToSeconds(properties.getStatsInterval()), 
TimeUnit.SECONDS)
                   .build();
       }
   ```
   and also configuration for producer:
   ```
   public Producer<byte[]> createProducer(PulsarClient pulsarClient, 
PulsarProducerProperties properties) {
   
            ProducerBuilder<byte[]> builder = 
pulsarClient.newProducer(Schema.BYTES);
            return builder.topic(properties.getTopicPublish())
                   
.batchingMaxPublishDelay(properties.getBatchingMaxPublishDelayMicros(), 
TimeUnit.MICROSECONDS) //100000
                   .batcherBuilder(BatcherBuilder.KEY_BASED)
                   .hashingScheme(HashingScheme.Murmur3_32Hash)
                   .blockIfQueueFull(true)
                   
.sendTimeout(parseDurationToSeconds(properties.getSendTimeout()), 
TimeUnit.SECONDS) //PT30S
                   .create();
    }
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to