Namespace: OpenEdge.Messaging.Kafka
Type: Class KafkaConsumer
Parent Classes:
Inherits: Progress.Lang.Object
Implements: OpenEdge.Messaging.IConsumer


/*
Copyright © 2021,2022 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.



Method Summary
  Options Name Purpose
  CommitOffset (IConsumerRecord) /** Acknowledge the receipt of the message and request the broker commit the offset of the message to store record position for recovery. */
  CHARACTER GetConfigOption (character)
  OpenEdge.Messaging.Internal.IConsumerDelegate GetConsumerDelegate () /** This method is for INTERNAL USE ONLY. Use this method to retrieve the underlying BIO implementation of the consumer. */
  CHARACTER GetConsumerOption (character) /** Retrieve the value of an option. */
  OpenEdge.Messaging.IDeserializer GetKeyDeserializer (character)
  CHARACTER GetTopicConfigOption (character, character) /** Lookup a configuration option for a topic. */
  OpenEdge.Messaging.IDeserializer GetValueDeserializer (character)
  OpenEdge.Messaging.IDeserializer lookupKeyDeserializerForTopic (String) /* lookup the deserializer for the given topic, or fall back to using the default deserializer configured for this consumer. @param topicName the topic name needed to find the correct deserializer @return a deserializer appropriate for the given topic */
  Progress.Lang.Object LookupTopicConfigValue (String, character) /** Lookup a configuration value from the named topic. */
  OpenEdge.Messaging.IDeserializer lookupValueDeserializerForTopic (String) /* Lookup value deserializer for the given topic or fall back to using the consumer's value deserializer. @param topicName the topic name needed to find the correct deserializer @return A deserializer appropriate for the given topic */
  OpenEdge.Messaging.IConsumerRecord Poll (integer) /** Poll for a single record @param timeout Timeout in milliseconds, to request the broker wait for records to send. @return A consumer record from one of the subscribed topics, if one is available. */

Constructor Summary
  Options Name Purpose
  KafkaConsumer (IConsumerDelegate, IStringStringMap, IStringKeyedMap) /** Create a Kafka consumer. This is marked as package-protected because we only want to create these through the ConsumerBuilder that is specific to Kafka. */

Property Summary
  Options Name Purpose
  CHARACTER ImplementationName
  CHARACTER ImplementationVersion
  OpenEdge.Messaging.IDeserializer KeyDeserializer
  OpenEdge.Core.Collections.IStringKeyedMap TopicKeyDeserializers
  OpenEdge.Core.Collections.IStringKeyedMap TopicValueDeserializers
  OpenEdge.Messaging.IDeserializer ValueDeserializer


Method Detail
Top

CommitOffset (IConsumerRecord)

Purpose:
Acknowledge the receipt of the message and request the broker commit the offset of the message
to store record position for recovery.
Parameters:
consumerRecord OpenEdge.Messaging.IConsumerRecord
 
Top

CHARACTER GetConfigOption (character)

Parameters:
name CHARACTER
 
Returns CHARACTER
 
Top

OpenEdge.Messaging.Internal.IConsumerDelegate GetConsumerDelegate ()

Purpose:
This method is for INTERNAL USE ONLY.
Use this method to retrieve the underlying BIO implementation of the consumer.
Returns OpenEdge.Messaging.Internal.IConsumerDelegate
 
Top

CHARACTER GetConsumerOption (character)

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

OpenEdge.Messaging.IDeserializer GetKeyDeserializer (character)

Parameters:
topicName CHARACTER
 
Returns OpenEdge.Messaging.IDeserializer
 
Top

CHARACTER GetTopicConfigOption (character, character)

Purpose:
Lookup a configuration option for a topic.
Parameters:
topicName CHARACTER
 
name CHARACTER
 
Returns CHARACTER
 
Top

OpenEdge.Messaging.IDeserializer GetValueDeserializer (character)

Parameters:
topicName CHARACTER
 
Returns OpenEdge.Messaging.IDeserializer
 
Top

OpenEdge.Messaging.IDeserializer lookupKeyDeserializerForTopic (String)

/*
lookup the deserializer for the given topic, or fall back to using the default
deserializer configured for this consumer.
Parameters:
topicName OpenEdge.Core.String
  the topic name needed to find the correct deserializer
Returns OpenEdge.Messaging.IDeserializer
  a deserializer appropriate for the given topic
Top

Progress.Lang.Object LookupTopicConfigValue (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.IDeserializer lookupValueDeserializerForTopic (String)

/*
Lookup value deserializer for the given topic or fall back to using
the consumer's value deserializer.
Parameters:
topicName OpenEdge.Core.String
  the topic name needed to find the correct deserializer
Returns OpenEdge.Messaging.IDeserializer
  A deserializer appropriate for the given topic
Top

OpenEdge.Messaging.IConsumerRecord Poll (integer)

Purpose:
Poll for a single record
Parameters:
timeout INTEGER
  Timeout in milliseconds, to request the broker wait for records to send.
Returns OpenEdge.Messaging.IConsumerRecord
  A consumer record from one of the subscribed topics, if one is available.


Constructor Detail
Top

KafkaConsumer (IConsumerDelegate, IStringStringMap, IStringKeyedMap)

Purpose:
Create a Kafka consumer.
This is marked as package-protected because we only want
to create these through the ConsumerBuilder that is specific to Kafka.
Parameters:
consumerDelegate OpenEdge.Messaging.Internal.IConsumerDelegate
 
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.IDeserializer KeyDeserializer

Returns OpenEdge.Messaging.IDeserializer
 
Top

OpenEdge.Core.Collections.IStringKeyedMap TopicKeyDeserializers

Returns OpenEdge.Core.Collections.IStringKeyedMap
 
Top

OpenEdge.Core.Collections.IStringKeyedMap TopicValueDeserializers

Returns OpenEdge.Core.Collections.IStringKeyedMap
 
Top

OpenEdge.Messaging.IDeserializer ValueDeserializer

Returns OpenEdge.Messaging.IDeserializer