Class: AWSCDK::LambdaEventSources::KafkaDlq
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::LambdaEventSources::KafkaDlq
- Includes:
- AWSCDK::Lambda::IEventSourceDlq
- Defined in:
- lambda_event_sources/kafka_dlq.rb
Overview
A Kafka topic dead letter queue destination configuration for a Lambda event source.
This destination can only be used with Kafka-based event sources (MSK and self-managed Kafka). When used with other event source types, a validation error will be thrown.
Kafka URI Format
new KafkaDlq('my-topic');
Topic Naming Requirements
Kafka topic names must follow these rules:
- Only alphanumeric characters, dots (.), underscores (_), and hyphens (-) are allowed
- Cannot be empty
- Must be a valid Kafka topic name
Class Method Summary collapse
Instance Method Summary collapse
-
#bind(_target, _target_handler) ⇒ AWSCDK::Lambda::DlqDestinationConfig
Returns a destination configuration for the DLQ.
-
#initialize(topic_name) ⇒ KafkaDlq
constructor
Creates a new Kafka DLQ destination.
Constructor Details
#initialize(topic_name) ⇒ KafkaDlq
Creates a new Kafka DLQ destination.
27 28 29 30 |
# File 'lambda_event_sources/kafka_dlq.rb', line 27 def initialize(topic_name) Jsii::Type.check_type(topic_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "topicName") Jsii::Object.instance_method(:initialize).bind(self).call(topic_name) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
32 33 34 35 36 |
# File 'lambda_event_sources/kafka_dlq.rb', line 32 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(_target, _target_handler) ⇒ AWSCDK::Lambda::DlqDestinationConfig
Returns a destination configuration for the DLQ.
The returned configuration is used in the AWS Lambda EventSourceMapping's DestinationConfig to specify where failed records should be sent.
46 47 48 49 50 |
# File 'lambda_event_sources/kafka_dlq.rb', line 46 def bind(_target, _target_handler) Jsii::Type.check_type(_target, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklFdmVudFNvdXJjZU1hcHBpbmcifQ==")), "_target") Jsii::Type.check_type(_target_handler, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklGdW5jdGlvbiJ9")), "_targetHandler") jsii_call_method("bind", [_target, _target_handler]) end |