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


/*
Copyright © 2021,2022Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Purpose:
The consumer builder is responsible for storing the configuration for, and
generating instances of, message consumers. This is an abstract class
that defines some generic functionality. More specific implementations
may provide additional strongly typed methods for configuring a producer.



Method Summary
  Options Name Purpose
  OpenEdge.Messaging.ConsumerBuilder AddSubscription (character) /** Add a topics the generated consumer will subscribe to. Multiple subscriptions may be added by calling this method multiple times. */
  OpenEdge.Messaging.ConsumerBuilder AddSubscriptions (character[]) /** Add a set of topics the generated consumer will subscribe to. This method does not replace the existing set of subscriptions configured for the consumer builder. */
  OpenEdge.Messaging.ConsumerBuilder AddTopicConfiguration (ITopicConfiguration) /** Add a topic configuration. The configuration is used by any constructed consumer to configure and read 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 consumer builder. */
  OpenEdge.Messaging.IConsumer Build () /** Build the message consumer using the current state of this ConsumerBuilder. @return An instance of OpenEdge.Messaging.IConsumer. */
  OpenEdge.Messaging.ConsumerBuilder Create (character) /** Build the message consumer using the current state of this Consumer Builder. @return An instance of OpenEdge.Messaging.IConsumer. */
  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.ConsumerBuilder SetBodyDeserializer (character) /** Provide the name of a class which must implement OpenEdge.Messaging.IDeserializer. An instance of this class will be created to convert the body values of messages from MEMPTR to LONGCHAR. @param valueDeserializerClassName The name of a class that implements OpenEdge.Messaging.IDeserializer. The Consumer will use an instance of this class to deserialize record bodies. @return This consumer builder. */
  OpenEdge.Messaging.ConsumerBuilder SetBodyDeserializer (IDeserializer) /** Provide an implementation of a deserializer that will be used to convert the body values of messages from MEMPTR to LONGCHAR. @param valueDeserializer An instance of an OpenEdge.Messaging.IDeserializer that will be used by any constructed Consumer to deserialize record bodies. @return This consumer builder. */
  OpenEdge.Messaging.ConsumerBuilder SetBodyDeserializerCodePage (character) /** Set the codepage used to deserialize string based message bodies. @param characterEncoding The name of a code page that will be used by the Consumer's serializer to convert MEMPTR values to LONGCHAR. @return This consumer builder. */
  OpenEdge.Messaging.ConsumerBuilder SetConsumerOption (character, character) /** Set a generic name=value pair that can be used to configure a consumer. 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 consumer option to store. @param val The value of the consumer option to store. @return This consumer builder. @throws Raises an error if name is unknown or empty. */
  OpenEdge.Messaging.ConsumerBuilder SetSubscriptions (character[]) /** Add a set of topics the generated consumer will subscribe to. The existing set of subscriptions will be replaced. */

Constructor Summary
  Options Name Purpose
  ConsumerBuilder ()

Property Summary
  Options Name Purpose
  OpenEdge.Messaging.TopicConfigurationBuilder TopicConfigurationBuilder


Method Detail
Top

OpenEdge.Messaging.ConsumerBuilder AddSubscription (character)

Purpose:
Add a topics the generated consumer will subscribe to. Multiple subscriptions
may be added by calling this method multiple times.
Parameters:
topicName CHARACTER
 
Returns OpenEdge.Messaging.ConsumerBuilder
 
Top

OpenEdge.Messaging.ConsumerBuilder AddSubscriptions (character[])

Purpose:
Add a set of topics the generated consumer will subscribe to. This
method does not replace the existing set of subscriptions configured
for the consumer builder.
Parameters:
topics CHARACTER
 
Returns OpenEdge.Messaging.ConsumerBuilder
 
Top

OpenEdge.Messaging.ConsumerBuilder AddTopicConfiguration (ITopicConfiguration)

Purpose:
Add a topic configuration. The configuration is used by any constructed consumer
to configure and read 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.ConsumerBuilder
  This consumer builder.
Top

OpenEdge.Messaging.IConsumer Build ()

Purpose:
Build the message consumer using the current state of this ConsumerBuilder.
Returns OpenEdge.Messaging.IConsumer
  An instance of OpenEdge.Messaging.IConsumer.
Top

OpenEdge.Messaging.ConsumerBuilder Create (character)

Purpose:
Build the message consumer using the current state of this Consumer Builder.
Parameters:
implementationName CHARACTER
 
Returns OpenEdge.Messaging.ConsumerBuilder
  An instance of OpenEdge.Messaging.IConsumer.
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.ConsumerBuilder SetBodyDeserializer (character)

Purpose:
Provide the name of a class which must implement OpenEdge.Messaging.IDeserializer.
An instance of this class will be created to convert the body values of messages
from MEMPTR to LONGCHAR.
The Consumer will use an instance of this class to deserialize record bodies.
Parameters:
bodyDeserializerClassName CHARACTER
 
Returns OpenEdge.Messaging.ConsumerBuilder
  This consumer builder.
Top

OpenEdge.Messaging.ConsumerBuilder SetBodyDeserializer (IDeserializer)

Purpose:
Provide an implementation of a deserializer that will be used to convert
the body values of messages from MEMPTR to LONGCHAR.
by any constructed Consumer to deserialize record bodies.
Parameters:
valueDeserializer OpenEdge.Messaging.IDeserializer
  An instance of an OpenEdge.Messaging.IDeserializer that will be used
Returns OpenEdge.Messaging.ConsumerBuilder
  This consumer builder.
Top

OpenEdge.Messaging.ConsumerBuilder SetBodyDeserializerCodePage (character)

Purpose:
Set the codepage used to deserialize string based message bodies.
to convert MEMPTR values to LONGCHAR.
Parameters:
characterEncoding CHARACTER
  The name of a code page that will be used by the Consumer's serializer
Returns OpenEdge.Messaging.ConsumerBuilder
  This consumer builder.
Top

OpenEdge.Messaging.ConsumerBuilder SetConsumerOption (character, character)

Purpose:
Set a generic name=value pair that can be used to configure a consumer. This is here
to handle the case where the strongly typed options on this class do not cover
all the possible configuration values needed.
@throws Raises an error if name is unknown or empty.
Parameters:
name CHARACTER
  The name of the consumer option to store.
val CHARACTER
  The value of the consumer option to store.
Returns OpenEdge.Messaging.ConsumerBuilder
  This consumer builder.
Top

OpenEdge.Messaging.ConsumerBuilder SetSubscriptions (character[])

Purpose:
Add a set of topics the generated consumer will subscribe to. The existing
set of subscriptions will be replaced.
Parameters:
topics CHARACTER
 
Returns OpenEdge.Messaging.ConsumerBuilder
 


Constructor Detail
Top

ConsumerBuilder ()



Property Detail
Top

OpenEdge.Messaging.TopicConfigurationBuilder TopicConfigurationBuilder

Returns OpenEdge.Messaging.TopicConfigurationBuilder