Namespace: OpenEdge.Messaging.Kafka
Class
KafkaProducerBuilder
Parent classes:
Inherits: OpenEdge.Messaging.ProducerBuilder

/*
Copyright © 2021,2022 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Purpose:
Implements a selection of properties that expose the common, high importance producer configuration values.
Any configuration option not explicitly set will remain at its library configured default. Values that do not
have specific properties exposed for them, may be configured using the name=value pair documented for the library.
You can find the full list for librdkafka here: https://docs.confluent.io/5.2.0/clients/librdkafka/md_CONFIGURATION.html




Method Summary
Options Name Purpose
OpenEdge.Messaging.IProducer Build () /** Build a kafka producer. */
OpenEdge.Core.Collections.IStringKeyedMap ConstructTopicKeySerializers (IStringKeyedMap) /** Pre-constructs all of the topic key serializers */
OpenEdge.Core.Collections.IStringKeyedMap ConstructTopicValueSerializers (IStringKeyedMap) /** Pre-constructs all of the topic body serializers */
CopyOptionsToProducerMap (IStringStringMap)
OpenEdge.Messaging.Kafka.KafkaProducerBuilder Create ()
OpenEdge.Messaging.Kafka.KafkaProducer CreateDefaultProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap) /** Create the default kafka producer (non-transactional). This method is marked as protected so it can be unit tested. */
OpenEdge.Messaging.Kafka.KafkaProducer CreateKafkaProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap) /* Create a kafka producer. This method is marked as protected so it can be unit tested. */
OpenEdge.Messaging.ISerializer CreateKeySerializer () /** Construct a key serializer for the producer. */
OpenEdge.Messaging.Internal.IProducerDelegate CreateProducerDelegate () /* Create the BIO producer. This is marked as protected so it can be overridden for unit tests. */
OpenEdge.Messaging.Kafka.IOptionFilter CreateProducerOptionFilter ()
OpenEdge.Messaging.Kafka.IOptionValidator CreateProducerOptionValidator () /** Create the producer option validator. By default this returns UNKNOWN. Override this to provide an actual implementation. */
OpenEdge.Messaging.ISerializer CreateSerializer (character) /** Construct a serializer from the given property name. The property stored in the config may be either an instance of the serializer, in which case the instance itself is returned, or the name of class that implements ISerializer, in which case, an new instance of the identified class is constructed and returned. */
OpenEdge.Messaging.ISerializer CreateSerializer (Object, character, character) /** Construct a serializer from a property value. This can be either an OpenEdge.Core.String that holds the name of a class that implements OpenEdge.Messaging.ISerializer, or it can be be an actual instance of OpenEdge.Messaging.ISerializer. If the name of a serializer class is provided, the class must have a no-argument contructor, and will be instantiated and cheked to ensure it implements ISerializer @param serializerObj an instance of ISerializer or a string holding the name of the serializer @param serializerPropertyName the name of the property to include in messages if an error occurs @param topicName if not unknown, this value is included in messages if an error occurs @return an serializer that implements OpenEdge.Messaging.ISerializer */
OpenEdge.Messaging.Kafka.IOptionFilter CreateTopicOptionFilter ()
OpenEdge.Messaging.Kafka.IOptionValidator CreateTopicOptionValidator () /** Create the per-topic option validator. The validator is here to prevent the application from setting configuration values that are completely unsupported by the underlying implementation. */
OpenEdge.Messaging.Kafka.KafkaTransactionalProducer CreateTransactionalProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap) /** Create a Kafka transactional producer. This method is marked as protected so it can be unit tested. */
OpenEdge.Messaging.ISerializer CreateValueSerializer () /** construct a value serializer for the producer. */
LOGICAL FilterOption (character) /** */
Progress.Lang.Object GetOptionAsObject (character) /* Override for GetOptionStringValue from ConfigBuilder to make it easier to access from utility functions. */
Progress.Lang.Object GetOptionObjectValue (character) /** Override for GetOptionStringValue from ConfigBuilder to make it easier to access from utility functions. */
CHARACTER GetOptionStringValue (character) /** Override for GetOptionStringValue from ConfigBuilder to make it easier to access from utility functions. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetAcks (Acks) /** set number of acknowledgements needed by default before broker responds to consumer when record(s) are sent. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetAcks (integer) /** Set number of acknowledgements needed by default before broker responds to consumer when record(s) are sent. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetBootstrapServers (character) /* Configure the producer with an initial list of Kafka brokers to which to connect. The format of the string is expected to be a comma delimited list in the form of <host>:<port>[,<host>:<port>...] @param boostraServers The bootstrap server value @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetBootstrapServers (URI) /** Configure the producer with an initial Kafka broker to which to connect. Each URI needs to provide a host and port which is used to locate a Kafka broker @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetBootstrapServers (URI[]) /* Configure the producer with an initial list of Kafka brokers to which to connect. The URI needs to provide a host and port that will be used to locate a Kafka broker. @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetClientId (character) /** Set the client id the client uses to identify itself to the server. @param clientId Set client id. @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetEnableIdempotence (logical) /** @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetKeySerializer (character) /** Provide the name of a class which must implement OpenEdge.Messaging.ISerializer. An instance of this class will be created to convert the message partition key values to MEMPTR. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetKeySerializer (ISerializer) /** Provide an implementation of a serializer that will be used to convert the message partition key values to MEMPTR. @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetKeySerializerCodePage (character) /** Set the codepage used to serialize string based message partition keys. @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetMessageMaxBytes (integer) /** Set the maximum number of message bytes allowed by the producer @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetMessageSendMaxRetries (integer) /** @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetQueueBufferingMaxKBytes (integer) /** @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetQueueBufferingMaxMessages (integer) /** @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetQueueBufferingMaxMs (int64) /** @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSASLMechanism (SASLMechanisms) /** Set the security mechanism to be used by the producer. @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSASLPassword (character) /** Set the SASL password. @param saslPassword The password @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSASLUserName (character) /** Set the security username to be used by the producer. @param saslUserName The security username . @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSecurityProtocol (character) /** @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSecurityProtocol (SecurityProtocol) /** Set security protocol used by the connection to the cluster. @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetStrictConfigNames (logical) /* Specify whether errors from kafka broker that indicate unsupported configuration names are returned to the ABL as an error, or if the error is quietly ignored. @param enforceStrictConfigNames whether to enforce strict config names. @return This producer builder. */
OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetTransactionalId (character) /** Set the transctional id that allowed the producer to produce messages inside transactions. @param transactionalId The application unique transactional id. The value cannot be an empty string. Pass the UNKNOWN value if you wish to clear the value. @return This producer builder. */

Constructor Summary
Options Name Purpose
KafkaProducerBuilder ()


Method Detail
Top

OpenEdge.Messaging.IProducer Build ()

Purpose:
Build a kafka producer.
Returns OpenEdge.Messaging.IProducer
Top

OpenEdge.Core.Collections.IStringKeyedMap ConstructTopicKeySerializers (IStringKeyedMap)

Purpose:
Pre-constructs all of the topic key serializers
Parameters:
topicConfigurations OpenEdge.Core.Collections.IStringKeyedMap
Returns OpenEdge.Core.Collections.IStringKeyedMap
Top

OpenEdge.Core.Collections.IStringKeyedMap ConstructTopicValueSerializers (IStringKeyedMap)

Purpose:
Pre-constructs all of the topic body serializers
Parameters:
topicConfigurations OpenEdge.Core.Collections.IStringKeyedMap
Returns OpenEdge.Core.Collections.IStringKeyedMap
Top

CopyOptionsToProducerMap (IStringStringMap)

Parameters:
config OpenEdge.Core.Collections.IStringStringMap
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder Create ()

Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
Top

OpenEdge.Messaging.Kafka.KafkaProducer CreateDefaultProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap)

Purpose:
Create the default kafka producer (non-transactional). This method is marked as protected so it can be unit tested.
Parameters:
bioProducer OpenEdge.Messaging.Internal.IProducerDelegate
config OpenEdge.Core.Collections.IStringStringMap
topicConfigurations OpenEdge.Core.Collections.IStringKeyedMap
Returns OpenEdge.Messaging.Kafka.KafkaProducer
Top

OpenEdge.Messaging.Kafka.KafkaProducer CreateKafkaProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap)

/*
Create a kafka producer. This method is marked as protected so it can be unit tested.
Parameters:
bioProducer OpenEdge.Messaging.Internal.IProducerDelegate
config OpenEdge.Core.Collections.IStringStringMap
topicConfigurations OpenEdge.Core.Collections.IStringKeyedMap
Returns OpenEdge.Messaging.Kafka.KafkaProducer
Top

OpenEdge.Messaging.ISerializer CreateKeySerializer ()

Purpose:
Construct a key serializer for the producer.
Returns OpenEdge.Messaging.ISerializer
Top

OpenEdge.Messaging.Internal.IProducerDelegate CreateProducerDelegate ()

/*
Create the BIO producer. This is marked as protected so it can be overridden for unit tests.
Returns OpenEdge.Messaging.Internal.IProducerDelegate
Top

OpenEdge.Messaging.Kafka.IOptionFilter CreateProducerOptionFilter ()

Returns OpenEdge.Messaging.Kafka.IOptionFilter
Top

OpenEdge.Messaging.Kafka.IOptionValidator CreateProducerOptionValidator ()

Purpose:
Create the producer option validator. By default this returns UNKNOWN.
Override this to provide an actual implementation.
Returns OpenEdge.Messaging.Kafka.IOptionValidator
Top

OpenEdge.Messaging.ISerializer CreateSerializer (character)

Purpose:
Construct a serializer from the given property name. The property stored in the config
may be either an instance of the serializer, in which case the instance itself is returned,
or the name of class that implements ISerializer, in which case, an new instance of the identified
class is constructed and returned.
Parameters:
serializerPropertyName CHARACTER
Returns OpenEdge.Messaging.ISerializer
Top

OpenEdge.Messaging.ISerializer CreateSerializer (Object, character, character)

Purpose:
Construct a serializer from a property value. This can be either an OpenEdge.Core.String
that holds the name of a class that implements OpenEdge.Messaging.ISerializer, or it can be
be an actual instance of OpenEdge.Messaging.ISerializer.
If the name of a serializer class is provided, the class must have a no-argument contructor,
and will be instantiated and cheked to ensure it implements ISerializer
Parameters:
serializerObj Progress.Lang.Object
an instance of ISerializer or a string holding the name of the serializer
serializerPropertyName CHARACTER
the name of the property to include in messages if an error occurs
topicName CHARACTER
if not unknown, this value is included in messages if an error occurs
Returns OpenEdge.Messaging.ISerializer
an serializer that implements OpenEdge.Messaging.ISerializer
Top

OpenEdge.Messaging.Kafka.IOptionFilter CreateTopicOptionFilter ()

Returns OpenEdge.Messaging.Kafka.IOptionFilter
Top

OpenEdge.Messaging.Kafka.IOptionValidator CreateTopicOptionValidator ()

Purpose:
Create the per-topic option validator. The validator
is here to prevent the application from setting configuration
values that are completely unsupported by the underlying implementation.
Returns OpenEdge.Messaging.Kafka.IOptionValidator
Top

OpenEdge.Messaging.Kafka.KafkaTransactionalProducer CreateTransactionalProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap)

Purpose:
Create a Kafka transactional producer. This method is marked as protected so it can be unit tested.
Parameters:
bioProducer OpenEdge.Messaging.Internal.IProducerDelegate
config OpenEdge.Core.Collections.IStringStringMap
topicConfigurations OpenEdge.Core.Collections.IStringKeyedMap
Returns OpenEdge.Messaging.Kafka.KafkaTransactionalProducer
Top

OpenEdge.Messaging.ISerializer CreateValueSerializer ()

Purpose:
construct a value serializer for the producer.
Returns OpenEdge.Messaging.ISerializer
Top

LOGICAL FilterOption (character)

Purpose:
Parameters:
configName CHARACTER
Returns LOGICAL
Top

Progress.Lang.Object GetOptionAsObject (character)

/*
Override for GetOptionStringValue from ConfigBuilder to make it easier to access
from utility functions.
Parameters:
propName CHARACTER
Returns Progress.Lang.Object
Top

Progress.Lang.Object GetOptionObjectValue (character)

Purpose:
Override for GetOptionStringValue from ConfigBuilder to make it easier to access
from utility functions.
Parameters:
propName CHARACTER
Returns Progress.Lang.Object
Top

CHARACTER GetOptionStringValue (character)

Purpose:
Override for GetOptionStringValue from ConfigBuilder to make it easier to access
from utility functions.
Parameters:
propName CHARACTER
Returns CHARACTER
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetAcks (Acks)

Purpose:
set number of acknowledgements needed by default
before broker responds to consumer when record(s)
are sent.
Parameters:
ack OpenEdge.Messaging.Kafka.Acks
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetAcks (integer)

Purpose:
Set number of acknowledgements needed by default
before broker responds to consumer when record(s)
are sent.
Parameters:
acks INTEGER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetBootstrapServers (character)

/*
Configure the producer with an initial list of Kafka brokers to which
to connect.
The format of the string is expected to be a comma delimited list in the form of
<host>:<port>[,<host>:<port>...] <port>[,<host>:<port>...]
Parameters:
bootstrapServers CHARACTER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetBootstrapServers (URI)

Purpose:
Configure the producer with an initial Kafka broker to which
to connect. Each URI needs to provide a host and port which is
used to locate a Kafka broker
Parameters:
bootstrapServer OpenEdge.Net.URI
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetBootstrapServers (URI[])

/*
Configure the producer with an initial list of Kafka brokers to which
to connect. The URI needs to provide a host and port that will be used
to locate a Kafka broker.
Parameters:
bootstrapServers OpenEdge.Net.URI
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetClientId (character)

Purpose:
Set the client id the client uses to identify itself to the server.
Parameters:
clientId CHARACTER
Set client id.
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetEnableIdempotence (logical)

Purpose:
Parameters:
enableIdempotence LOGICAL
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetKeySerializer (character)

Purpose:
Provide the name of a class which must implement OpenEdge.Messaging.ISerializer.
An instance of this class will be created to convert the message partition key values
to MEMPTR.
Parameters:
keySerializerClassName CHARACTER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetKeySerializer (ISerializer)

Purpose:
Provide an implementation of a serializer that will be used to convert
the message partition key values to MEMPTR.
Parameters:
keySerializer OpenEdge.Messaging.ISerializer
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetKeySerializerCodePage (character)

Purpose:
Set the codepage used to serialize string based message partition keys.
Parameters:
characterEncoding CHARACTER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetMessageMaxBytes (integer)

Purpose:
Set the maximum number of message bytes allowed by the producer
Parameters:
messageMaxBytes INTEGER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetMessageSendMaxRetries (integer)

Purpose:
Parameters:
messageSendMaxRettries INTEGER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetQueueBufferingMaxKBytes (integer)

Purpose:
Parameters:
queueBufferingMaxKBytes INTEGER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetQueueBufferingMaxMessages (integer)

Purpose:
Parameters:
queueBufferingMaxMessages INTEGER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetQueueBufferingMaxMs (int64)

Purpose:
Parameters:
maxBufferingMs INT64
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSASLMechanism (SASLMechanisms)

Purpose:
Set the security mechanism to be used by the producer.
Parameters:
saslMechanism OpenEdge.Messaging.Kafka.SASLMechanisms
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSASLPassword (character)

Purpose:
Set the SASL password.
Parameters:
saslPassword CHARACTER
The password
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSASLUserName (character)

Purpose:
Set the security username to be used by the producer.
Parameters:
saslUserName CHARACTER
The security username .
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSecurityProtocol (character)

Purpose:
Parameters:
securityProtocol CHARACTER
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetSecurityProtocol (SecurityProtocol)

Purpose:
Set security protocol used by the connection to the cluster.
Parameters:
securityProtocol OpenEdge.Messaging.Kafka.SecurityProtocol
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetStrictConfigNames (logical)

/*
Specify whether errors from kafka broker that indicate unsupported configuration names
are returned to the ABL as an error, or if the error is quietly ignored.
Parameters:
enforceStrictConfigNames LOGICAL
whether to enforce strict config names.
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.
Top

OpenEdge.Messaging.Kafka.KafkaProducerBuilder SetTransactionalId (character)

Purpose:
Set the transctional id that allowed the producer to produce messages inside transactions.
Pass the UNKNOWN value if you wish to clear the value.
Parameters:
transactionalId CHARACTER
The application unique transactional id. The value cannot be an empty string.
Returns OpenEdge.Messaging.Kafka.KafkaProducerBuilder
This producer builder.


Constructor Detail
Top

KafkaProducerBuilder ()



Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.6.0