namespace Amazon.Lambda.KafkaEvents
{
using System.Collections.Generic;
using System.IO;
///
/// Apache Kafka event
/// https://docs.aws.amazon.com/lambda/latest/dg/with-msk.html
/// https://docs.aws.amazon.com/lambda/latest/dg/with-kafka.html
///
public class KafkaEvent
{
///
/// The source of the event.
///
public string EventSource { get; set; }
///
/// The ARN of the event source.
///
public string EventSourceArn { get; set; }
///
/// Initial list of brokers as a CSV list of broker host or host:port.
///
public string BootstrapServers { get; set; }
///
/// List of Kafka event records.
///
public IDictionary> Records { get; set; }
///
/// Kafka event record.
///
public class KafkaEventRecord
{
///
/// The topic associated with the event record.
///
public string Topic { get; set; }
///
/// The partition associated with the event record.
///
public int Partition { get; set; }
///
/// The partition offset associated with the event record.
///
public long Offset { get; set; }
///
/// The Kafka event record timestamp.
///
public long Timestamp { get; set; }
///
/// The Kafka event record timestamp type.
///
public string TimestampType { get; set; }
///
/// The Kafka event record Key.
///
public string Key { get; set; }
///
/// The Kafka event record Value.
///
public MemoryStream Value { get; set; }
///
/// The Kafka event record headers.
///
public IList> Headers { get; set; }
}
}
}