Class ProducerBuilderConfigurationUtil

java.lang.Object
org.springframework.pulsar.core.ProducerBuilderConfigurationUtil

public final class ProducerBuilderConfigurationUtil extends Object
Utility methods to help load configuration into a ProducerBuilder.

The main purpose is to work around the underlying Pulsar issue where ProducerBuilder.loadConf(java.util.Map<java.lang.String, java.lang.Object>) sets @JsonIgnore fields to null.

Should be removed once the above issue is fixed.

Author:
Chris Bono
  • Method Details

    • loadConf

      public static <T> void loadConf(org.apache.pulsar.client.api.ProducerBuilder<T> builder, Map<String,Object> properties)
      Configures the specified properties onto the specified builder in a manner that loads non-serializable properties. See Pulsar PR.
      Type Parameters:
      T - the payload type
      Parameters:
      builder - the builder
      properties - the properties to set on the builder