Class ProducerFactoryImpl
java.lang.Object
com.here.platform.data.client.service.stream.kafka.ProducerFactoryImpl
- All Implemented Interfaces:
ProducerFactory
Creates a new producer instance from given parameters
param: streamService param: userProperties param: retryPolicyType param: clientExecutionContext
-
Constructor Summary
ConstructorsConstructorDescriptionProducerFactoryImpl(StreamConfigProvider streamService, scala.collection.immutable.Seq<String> supportedVersions, scala.collection.immutable.Map<String, String> userProperties, RetryPolicyType retryPolicyType, ClientExecutionContext clientExecutionContext) -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertiesbuildProducerConfig(HereToken hereTokenCredentials, KafkaEndpoints endpoints, String clientId, scala.collection.immutable.Map<String, String> userProperties) scala.concurrent.Future<Producer>create(ProducerKey key, HereToken hereTokenCredentials, scala.Function3<ProducerKey, String, org.apache.kafka.clients.producer.Producer<String, byte[]>, scala.runtime.BoxedUnit> regionChangeListener) createReconnected(ProducerKey key, String topic, org.apache.kafka.clients.producer.Producer<String, byte[]> producer) scala.concurrent.Future<KafkaEndpoints>streamEndpoints(String loggingKey, KafkaStreamSettings streamSettings)
-
Constructor Details
-
ProducerFactoryImpl
public ProducerFactoryImpl(StreamConfigProvider streamService, scala.collection.immutable.Seq<String> supportedVersions, scala.collection.immutable.Map<String, String> userProperties, RetryPolicyType retryPolicyType, ClientExecutionContext clientExecutionContext)
-
-
Method Details
-
buildProducerConfig
public static Properties buildProducerConfig(HereToken hereTokenCredentials, KafkaEndpoints endpoints, String clientId, scala.collection.immutable.Map<String, String> userProperties) -
clientExecutionContext
-
streamEndpoints
public scala.concurrent.Future<KafkaEndpoints> streamEndpoints(String loggingKey, KafkaStreamSettings streamSettings) -
create
public scala.concurrent.Future<Producer> create(ProducerKey key, HereToken hereTokenCredentials, scala.Function3<ProducerKey, String, org.apache.kafka.clients.producer.Producer<String, byte[]>, scala.runtime.BoxedUnit> regionChangeListener) - Specified by:
createin interfaceProducerFactory
-
createReconnected
public Producer createReconnected(ProducerKey key, String topic, org.apache.kafka.clients.producer.Producer<String, byte[]> producer) - Specified by:
createReconnectedin interfaceProducerFactory
-