Class ConsumerRecords<TK, T>
Represents a collection of Kafka consumer records that can be enumerated. Contains event metadata and records organized by topics.
Inherited Members
Namespace: AWS.Lambda.Powertools.Kafka.Avro
Assembly: AWS.Lambda.Powertools.Kafka.Avro.dll
Syntax
public class ConsumerRecords<TK, T> : IEnumerable<ConsumerRecord<TK, T>>, IEnumerable
Type Parameters
Name | Description |
---|---|
TK | The type of Key values from the event. |
T | The type of the record values from the event. |
Properties
BootstrapServers
Gets the Kafka bootstrap servers connection string.
Declaration
public string BootstrapServers { get; }
Property Value
Type | Description |
---|---|
string |
EventSource
Gets the event source (typically "aws:kafka").
Declaration
public string EventSource { get; }
Property Value
Type | Description |
---|---|
string |
EventSourceArn
Gets the ARN of the event source (MSK cluster or Self-managed Kafka).
Declaration
public string EventSourceArn { get; }
Property Value
Type | Description |
---|---|
string |
Methods
GetEnumerator()
Returns an enumerator that iterates through all consumer records across all topics.
Declaration
public IEnumerator<ConsumerRecord<TK, T>> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<ConsumerRecord<TK, T>> | An enumerator of ConsumerRecord<T> objects. |