Class PulsarProducerConfig
java.lang.Object
io.numaproj.pulsar.config.producer.PulsarProducerConfig
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
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 clientpulsarProducerProperties- parsed pulsar.producer configpulsarAdmin- 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 clientpulsarProducerProperties- parsed pulsar.producer configpulsarAdmin- admin client used to verify topic existenceenvLookup- resolver for the NUMAFLOW_POD environment variable- Returns:
- the configured producer
- Throws:
Exception- if validation fails or the producer cannot be built
-