in pulsar-log4j2-appender/src/main/java/org/apache/pulsar/log4j2/appender/PulsarManager.java [116:135]
public void startup() throws Exception {
createClient();
ProducerBuilder<byte[]> producerBuilder = client.newProducer()
.topic(topic)
.blockIfQueueFull(false);
if (syncSend) {
// disable batching for sync send
producerBuilder = producerBuilder.enableBatching(false);
} else {
// enable batching in 10 ms for async send
producerBuilder = producerBuilder
.enableBatching(true)
.batchingMaxPublishDelay(10, TimeUnit.MILLISECONDS);
}
Map<String, Object> producerConfiguration = propertiesToProducerConfiguration();
if (!producerConfiguration.isEmpty()) {
producerBuilder.loadConf(producerConfiguration);
}
producer = producerBuilder.create();
}