tree: dd1c4b9db826ac912bc1d5b41d037d1005804e78
  1. client-configuration-client.md
  2. client-configuration-consumer.md
  3. client-configuration-producer.md
  4. client-configuration-reader.md
  5. README.md
static/reference/next/client/README.md

Client Configurations

If you create a Java client, producer, consumer, or reader, you can use the loadConf configurations.

Set client memory allocator configs using Java system properties

You can set the client memory allocator configurations through Java properties.

PropertyType Description DefaultAvailable values
pulsar.allocator.pooledStringIf set to true, the client uses a direct memory pool.
If set to false, the client uses a heap memory without pool.
true true false
pulsar.allocator.exit_on_oomStringWhether to exit the JVM when OOM happens.false true false
pulsar.allocator.leak_detectionStringThe leak detection policy for Pulsar bytebuf allocator. Disabled: No leak detection and no overhead. Simple: Instruments 1% of the allocated buffer to track for leaks. Advanced: Instruments 1% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer is used. Paranoid: Instruments 100% of the allocated buffer to track for leaks, reporting stack traces of places where the buffer is used and introduces a significant overhead. Disabled Disabled Simple Advanced Paranoid
pulsar.allocator.out_of_memory_policyStringWhen an OOM occurs, the client throws an exception or fallbacks to heap.FallbackToHeap ThrowException FallbackToHeap

Example

Dpulsar.allocator.pooled=true
Dpulsar.allocator.exit_on_oom=false
Dpulsar.allocator.leak_detection=Disabled
Dpulsar.allocator.out_of_memory_policy=ThrowException