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

/*
Copyright © 2021 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 */
CopyTopicSerializers ()
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, create a new one from what is set in the topic config props, or fall back to using the default serializer configured for this producer. */
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. This may return a cached value. If the topic doesn't have a serializer specified, this falls back to using the producers value serializer. */
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.RecordBuilder RecordBuilder
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
bioProducer OpenEdge.Messaging.Internal.IProducerDelegate
Top

CopyTopicSerializers ()

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, create a new one
from what is set in the topic config props, or fall back to using the default
serializer configured for this producer.
Parameters:
destString OpenEdge.Core.String
Returns OpenEdge.Messaging.ISerializer
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. This may return a cached value.
If the topic doesn't have a serializer specified, this falls back to using
the producers value serializer.
Parameters:
destString OpenEdge.Core.String
Returns OpenEdge.Messaging.ISerializer
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:
bioProducer 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.RecordBuilder RecordBuilder

Returns OpenEdge.Messaging.RecordBuilder
Top

OpenEdge.Messaging.ISerializer ValueSerializer

Returns OpenEdge.Messaging.ISerializer


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.5.0