Class PulsarProducerConfig

java.lang.Object
io.numaproj.pulsar.config.producer.PulsarProducerConfig

public final class PulsarProducerConfig extends Object
Builds a Pulsar Producer from configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.pulsar.client.api.Producer<byte[]>
    create(org.apache.pulsar.client.api.PulsarClient pulsarClient, PulsarProducerProperties pulsarProducerProperties, org.apache.pulsar.client.admin.PulsarAdmin pulsarAdmin)
    Creates a new producer using the system environment for pod-name lookup.
    static org.apache.pulsar.client.api.Producer<byte[]>
    create(org.apache.pulsar.client.api.PulsarClient pulsarClient, PulsarProducerProperties pulsarProducerProperties, org.apache.pulsar.client.admin.PulsarAdmin pulsarAdmin, EnvLookup envLookup)
    Creates a new producer using the given environment lookup.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • create

      public static org.apache.pulsar.client.api.Producer<byte[]> create(org.apache.pulsar.client.api.PulsarClient pulsarClient, PulsarProducerProperties pulsarProducerProperties, org.apache.pulsar.client.admin.PulsarAdmin pulsarAdmin) throws Exception
      Creates a new producer using the system environment for pod-name lookup.
      Parameters:
      pulsarClient - the Pulsar client
      pulsarProducerProperties - parsed pulsar.producer config
      pulsarAdmin - admin client used to verify topic existence
      Returns:
      the configured producer
      Throws:
      Exception - if validation fails or the producer cannot be built
    • create

      public static org.apache.pulsar.client.api.Producer<byte[]> create(org.apache.pulsar.client.api.PulsarClient pulsarClient, PulsarProducerProperties pulsarProducerProperties, org.apache.pulsar.client.admin.PulsarAdmin pulsarAdmin, EnvLookup envLookup) throws Exception
      Creates a new producer using the given environment lookup.
      Parameters:
      pulsarClient - the Pulsar client
      pulsarProducerProperties - parsed pulsar.producer config
      pulsarAdmin - admin client used to verify topic existence
      envLookup - resolver for the NUMAFLOW_POD environment variable
      Returns:
      the configured producer
      Throws:
      Exception - if validation fails or the producer cannot be built