Namespace: OpenEdge.Messaging.Kafka
Class
KafkaProducer
Parent classes:
Inherits: Progress.Lang.Object
Implements: OpenEdge.Messaging.IProducer

/*
Copyright © 2021,2022 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Purpose:
this layer sits above the BIO and implements a kafka specific message producer.
The primary job of this producer is two fold:
1. managing the BIO layer
2. handling serialization of data to MEMPTR using the configured serializer




Method Summary
Options Name Purpose
MEMPTR ConvertToMemptr (Object, ISerializer, ISerializationContext)
CopyHeadersToBIOProducer (IHeaders, IProducerDelegate) /* Push all the headers */
OpenEdge.Messaging.ISendResponse CreateSendResponse (ISendResponse)
LOGICAL Flush (integer) /** ensure all inflight messages are sent and acknowledged */
CHARACTER GetProducerOption (character) /** Retrieve the value of an option. */
CHARACTER GetTopicOption (character, character) /** Retrieve topic configuration value as a string if possible. Otherwise returns UNKNOWN value. */
OpenEdge.Messaging.ISerializer lookupKeySerializerForTopic (String) /* lookup the serializer for the topic. if not already cached, fall back to using the default key serializer configured for this producer. @param topicName the topic name needed to find the correct serializer @return A serializer appropriate for the given topic */
Progress.Lang.Object LookupTopicConfigurationValue (String, character) /** Lookup a configuration value from the named topic. */
OpenEdge.Messaging.ISerializer lookupValueSerializerForTopic (String) /* Lookup value serializer for the given topic. If the topic does not have a serializer specified, this falls back to using the producers value serializer. @param topicName the topic name needed to find the correct serializer @return A serializer appropriate for the given topic */
OpenEdge.Messaging.ISendResponse Send (IProducerRecord) /** Send the record. */

Constructor Summary
Options Name Purpose
KafkaProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap) /** marked as protected because we only want to create these through the ProducerBuilder that is specific to Kafka */

Property Summary
Options Name Purpose
CHARACTER ImplementationName
CHARACTER ImplementationVersion
OpenEdge.Messaging.ISerializer KeySerializer
OpenEdge.Messaging.Internal.IProducerDelegate ProducerDelegate
OpenEdge.Messaging.RecordBuilder RecordBuilder
OpenEdge.Core.Collections.IStringKeyedMap TopicKeySerializers
OpenEdge.Core.Collections.IStringKeyedMap TopicValueSerializers
OpenEdge.Messaging.ISerializer ValueSerializer


Method Detail
Top

MEMPTR ConvertToMemptr (Object, ISerializer, ISerializationContext)

Parameters:
convertable Progress.Lang.Object
serializer OpenEdge.Messaging.ISerializer
ctx OpenEdge.Messaging.ISerializationContext
Returns MEMPTR
Top

CopyHeadersToBIOProducer (IHeaders, IProducerDelegate)

/*
Push all the headers
Parameters:
headers OpenEdge.Messaging.IHeaders
producerDelegate OpenEdge.Messaging.Internal.IProducerDelegate
Top

OpenEdge.Messaging.ISendResponse CreateSendResponse (ISendResponse)

Parameters:
delegateResponse OpenEdge.Messaging.ISendResponse
Returns OpenEdge.Messaging.ISendResponse
Top

LOGICAL Flush (integer)

Purpose:
ensure all inflight messages are sent and acknowledged
Parameters:
timeout INTEGER
Returns LOGICAL
Top

CHARACTER GetProducerOption (character)

Purpose:
Retrieve the value of an option.
Parameters:
name CHARACTER
Returns CHARACTER
Top

CHARACTER GetTopicOption (character, character)

Purpose:
Retrieve topic configuration value as a string if possible. Otherwise
returns UNKNOWN value.
Parameters:
topicName CHARACTER
optionName CHARACTER
Returns CHARACTER
Top

OpenEdge.Messaging.ISerializer lookupKeySerializerForTopic (String)

/*
lookup the serializer for the topic. if not already cached, fall back to using the default
key serializer configured for this producer.
Parameters:
topicName OpenEdge.Core.String
the topic name needed to find the correct serializer
Returns OpenEdge.Messaging.ISerializer
A serializer appropriate for the given topic
Top

Progress.Lang.Object LookupTopicConfigurationValue (String, character)

Purpose:
Lookup a configuration value from the named topic.
Parameters:
topicName OpenEdge.Core.String
propertyName CHARACTER
Returns Progress.Lang.Object
Top

OpenEdge.Messaging.ISerializer lookupValueSerializerForTopic (String)

/*
Lookup value serializer for the given topic. If the topic does not
have a serializer specified, this falls back to using
the producers value serializer.
Parameters:
topicName OpenEdge.Core.String
the topic name needed to find the correct serializer
Returns OpenEdge.Messaging.ISerializer
A serializer appropriate for the given topic
Top

OpenEdge.Messaging.ISendResponse Send (IProducerRecord)

Purpose:
Send the record.
Parameters:
record OpenEdge.Messaging.IProducerRecord
Returns OpenEdge.Messaging.ISendResponse


Constructor Detail
Top

KafkaProducer (IProducerDelegate, IStringStringMap, IStringKeyedMap)

Purpose:
marked as protected because we only want
to create these through the ProducerBuilder
that is specific to Kafka
Parameters:
producerDelegate OpenEdge.Messaging.Internal.IProducerDelegate
config OpenEdge.Core.Collections.IStringStringMap
topicConfigurations OpenEdge.Core.Collections.IStringKeyedMap


Property Detail
Top

CHARACTER ImplementationName

Returns CHARACTER
Top

CHARACTER ImplementationVersion

Returns CHARACTER
Top

OpenEdge.Messaging.ISerializer KeySerializer

Returns OpenEdge.Messaging.ISerializer
Top

OpenEdge.Messaging.Internal.IProducerDelegate ProducerDelegate

Returns OpenEdge.Messaging.Internal.IProducerDelegate
Top

OpenEdge.Messaging.RecordBuilder RecordBuilder

Returns OpenEdge.Messaging.RecordBuilder
Top

OpenEdge.Core.Collections.IStringKeyedMap TopicKeySerializers

Returns OpenEdge.Core.Collections.IStringKeyedMap
Top

OpenEdge.Core.Collections.IStringKeyedMap TopicValueSerializers

Returns OpenEdge.Core.Collections.IStringKeyedMap
Top

OpenEdge.Messaging.ISerializer ValueSerializer

Returns OpenEdge.Messaging.ISerializer


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.6.0