Namespace: OpenEdge.Messaging
Type: Class ProducerBuilder
Parent Classes:
Inherits: OpenEdge.Core.Util.ConfigBuilder


/*
Copyright © 2021,2022 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Purpose:
A producer builder creates instances of Producer. This class
holds the basic functionality, and must be extended with additional
functionality



Method Summary
  Options Name Purpose
  OpenEdge.Messaging.ProducerBuilder AddTopicConfiguration (ITopicConfiguration) /** Add a topic configuration. The configuration is used by any constructed producer to configure and send records to the messaging system. Adding a new TopicConfiguration will replace an existing configuration entry where the topic names match. @param config A topic configuration. @return This producer builder. */
  OpenEdge.Messaging.IProducer Build () /** Build the message producer using the current state of this Producer Builder. @return An instance of OpenEdge.Messaging.IProducer. */
  OpenEdge.Messaging.ProducerBuilder Create (character) /** create an instance of producer builder by name. @param implementationName The name of the producer builder implementation to retrieve. This uses ProducerRegistry:Instance to lookup the implementation class from the given implementation name. An exception will be thrown if an invalid implementation name is given, or an appropriate ProducerBuilder cannot be constructed. @Return An instance of ProducerBuilder that can be used to construct an OpenEdge.Messaging.IProducer. */
  LOGICAL FilterOption (character) /** Filter out any options that should explicitly not be sent to librdkafka. These are ones for which librdkafka would normally generate an error messsage, but we added them for use by the Mesaging framework. @param configName Name of confiugration property that should be filtered. @return true if the option should be sent to the BIO, false if the configuration name=value should not be passed to the BIO */
  OpenEdge.Messaging.ProducerBuilder SetBodySerializer (character) /** Provide the name of a class which must implement OpenEdge.Messaging.ISerializer. An instance of this class will be created to convert the body values of messages to MEMPTR. @param valueSerializerClassName The name of a class that implements OpenEdge.Messaging.ISerializer. The Producer will use an instance of this class to serialize record bodies. @return This producer builder. */
  OpenEdge.Messaging.ProducerBuilder SetBodySerializer (ISerializer) /** Provide an implementation of a serializer that will be used to convert the body values of messages to MEMPTR. @param valueSerializer An instance of an OpenEdge.Messaging.ISerializer that will be used by any constructed Producer to serialize record bodies. @return This producer builder. */
  OpenEdge.Messaging.ProducerBuilder SetBodySerializerCodePage (character) /** Set the codepage used to serialize string based message bodies. @param characterEncoding The name of a code page that will be used by the Producer's serializer to convert CHARACTER and LONGCHAR record bodies to MEMPTR. @return This producer builder. */
  OpenEdge.Messaging.ProducerBuilder SetProducerOption (character, character) /** Set a generic name=value pair that can be used to configure a producer. This is here to handle the case where the strongly typed options on this class do not cover all the possible configuration values needed. @param name The name of the producer option to store. @param val The value of the producer option to store. @return This producer builder. If name is specified as unknown or is empty, return ? */

Constructor Summary
  Options Name Purpose
  ProducerBuilder ()

Property Summary
  Options Name Purpose
  OpenEdge.Messaging.TopicConfigurationBuilder TopicConfigurationBuilder


Method Detail
Top

OpenEdge.Messaging.ProducerBuilder AddTopicConfiguration (ITopicConfiguration)

Purpose:
Add a topic configuration. The configuration is used by any constructed producer
to configure and send records to the messaging system.
Adding a new TopicConfiguration will replace an existing configuration entry where the
topic names match.
Parameters:
config OpenEdge.Messaging.ITopicConfiguration
  A topic configuration.
Returns OpenEdge.Messaging.ProducerBuilder
  This producer builder.
Top

OpenEdge.Messaging.IProducer Build ()

Purpose:
Build the message producer using the current state of this Producer Builder.
Returns OpenEdge.Messaging.IProducer
  An instance of OpenEdge.Messaging.IProducer.
Top

OpenEdge.Messaging.ProducerBuilder Create (character)

Purpose:
create an instance of producer builder by name.
uses ProducerRegistry:Instance to lookup the implementation class from the given implementation name.
An exception will be thrown if an invalid implementation name is given, or an appropriate ProducerBuilder
cannot be constructed.
Parameters:
implementationName CHARACTER
  The name of the producer builder implementation to retrieve. This
Returns OpenEdge.Messaging.ProducerBuilder
  An instance of ProducerBuilder that can be used to construct an OpenEdge.Messaging.IProducer.
Top

LOGICAL FilterOption (character)

Purpose:
Filter out any options that should explicitly not be sent to librdkafka. These
are ones for which librdkafka would normally generate an error messsage, but
we added them for use by the Mesaging framework.
Parameters:
configName CHARACTER
  Name of confiugration property that should be filtered.
Returns LOGICAL
  true if the option should be sent to the BIO, false if the configuration name=value should not be passed to the BIO
Top

OpenEdge.Messaging.ProducerBuilder SetBodySerializer (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 body values of messages
to MEMPTR.
The Producer will use an instance of this class to serialize record bodies.
Parameters:
bodySerializerClassName CHARACTER
 
Returns OpenEdge.Messaging.ProducerBuilder
  This producer builder.
Top

OpenEdge.Messaging.ProducerBuilder SetBodySerializer (ISerializer)

Purpose:
Provide an implementation of a serializer that will be used to convert
the body values of messages to MEMPTR.
by any constructed Producer to serialize record bodies.
Parameters:
valueSerializer OpenEdge.Messaging.ISerializer
  An instance of an OpenEdge.Messaging.ISerializer that will be used
Returns OpenEdge.Messaging.ProducerBuilder
  This producer builder.
Top

OpenEdge.Messaging.ProducerBuilder SetBodySerializerCodePage (character)

Purpose:
Set the codepage used to serialize string based message bodies.
to convert CHARACTER and LONGCHAR record bodies to MEMPTR.
Parameters:
characterEncoding CHARACTER
  The name of a code page that will be used by the Producer's serializer
Returns OpenEdge.Messaging.ProducerBuilder
  This producer builder.
Top

OpenEdge.Messaging.ProducerBuilder SetProducerOption (character, character)

Purpose:
Set a generic name=value pair that can be used to configure a producer. This is here
to handle the case where the strongly typed options on this class do not cover
all the possible configuration values needed.
Parameters:
name CHARACTER
  The name of the producer option to store.
val CHARACTER
  The value of the producer option to store.
Returns OpenEdge.Messaging.ProducerBuilder
  This producer builder. If name is specified as unknown or is empty, return ?


Constructor Detail
Top

ProducerBuilder ()



Property Detail
Top

OpenEdge.Messaging.TopicConfigurationBuilder TopicConfigurationBuilder

Returns OpenEdge.Messaging.TopicConfigurationBuilder