--- url: "http://www.enterpriseintegrationpatterns.com/DeadLetterChannel.html" titulek: "Dead Letter Channel - Enterprise Integration Patterns" h1: "" popis: "What will the messaging system do with a message it cannot deliver?" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-15 15:34:52" znaku: 6088 slov: 566 kodovani: "utf-8" sha256: "714f6babd327e622695d9be989c93c704d23b034cb2e0fcc1065a0eaa203a278" --- | | Dead Letter Channel[Messaging Patterns](index.html) » [Messaging Channels](MessagingChannelsIntro.html) | [Contents](toc.html)[⇐ Prev](InvalidMessageChannel.html)[Next ⇒](GuaranteedMessaging.html) | | --- | --- | --- | An enterprise is using [*Messaging*](Messaging.html) to integrate applications. What will the messaging system do with a message it cannot deliver? When a messaging system determines that it cannot or should not deliver a message, it may elect to move the message to a *Dead Letter Channel*. The specific way a *Dead Letter Channel* works depends on the specific messaging system’s implementation, if it provides one at all. The channel may be called a “dead message queue” [[Monson-Haefel, p.125](http://www.amazon.com/exec/obidos/ASIN/0596000685/enterpriseint-20)] or *dead letter queue* (DLQ). [[MQSeries](http://www.ibm.com/software/mqseries)], [[Dickman, pp.28-29](http://www.amazon.com/exec/obidos/ASIN/0201325810/enterpriseint-20)] Typically, each machine the messaging system is installed on has its own local *Dead Letter Channel* so that whatever machine a message dies on, it can be moved from one local queue to another without any networking uncertainties. This also records what machine the message died on. When the messaging system moves the message, it may also record the original channel the message was supposed to be delivered on. ... Read the entire pattern in the book [Enterprise Integration Patterns](/books1.html) ## Example: Dead Letter Queue in Amazon SQS[NEW](/ramblings/eip1_examples_updated.html) Many hosted messaging systems, including Amazon's [Simple Queuing Service (SQS)](https://aws.amazon.com/sqs) include a *Dead Letter Channel*. Amazon's Dead Letter Queue behavior is closely related to the way SQS delivers messages. After a consumer fetches a message from a queue, the messages remains on the queue, but hidden from other consumers to avoid fetching and processing the same message multiple times. After processing a message, the consumer is responsible for explicitly deleting the message. If the consumer doesn't delete the message, for example because because it crashed while processing the message, the message becomes visible again after the message's *Visibility Timeout* expires. Each time this happens, the message's receive count is increased. When this count reaches a configured limit, the message is considered undeliverable and placed in a designated Dead Letter Queue. Other AWS services like [Amazon EventBridge](https://aws.amazon.com/eventbridge/) also feature a *Dead Letter Channel*. ## Example: Kafka Connect[NEW](/ramblings/eip1_examples_updated.html) Kafka Connect, Confluent's tool for data streaming to and from Kafka includes a *Dead Letter Channel* for sink connectors. As per the [documentation](https://docs.confluent.io/platform/current/connect/concepts.html#dead-letter-queue), the *Dead Letter Channel* is active when the connector is configured to tolerate errors (otherwise, it'd abort and not send messages to any queue). The name of the *Dead Letter Channel* can easily be configured: ``` errors.tolerance = all errors.deadletterqueue.topic.name = ``` **Related patterns:** [*Invalid Message Channel*](InvalidMessageChannel.html), [*Message Expiration*](MessageExpiration.html), [*Selective Consumer*](MessageSelector.html), [*Messaging*](Messaging.html) --- ## Integration Pattern Language [Message Construct.](MessageConstructionIntro.html) [Message](Message.html) [Command Message](CommandMessage.html) [Document Message](DocumentMessage.html) [Event Message](EventMessage.html) [Request-Reply](RequestReply.html) [Return Address](ReturnAddress.html) [Correlation Identifier](CorrelationIdentifier.html) [Message Sequence](MessageSequence.html) [Message Expiration](MessageExpiration.html) [Format Indicator](FormatIndicator.html) [Message Routing](MessageRoutingIntro.html) [Pipes-and-Filters](PipesAndFilters.html) [Message Router](MessageRouter.html) [Content-based Router](ContentBasedRouter.html) [Message Filter](Filter.html) [Dynamic Router](DynamicRouter.html) [Recipient List](RecipientList.html) [Splitter](Sequencer.html) [Aggregator](Aggregator.html) [Resequencer](Resequencer.html) [Composed Msg. Processor](DistributionAggregate.html) [Scatter-Gather](BroadcastAggregate.html) [Routing Slip](RoutingTable.html) [Process Manager](ProcessManager.html) [Message Broker](MessageBroker.html) [Message Transformation](MessageTransformationIntro.html) [Message Translator](MessageTranslator.html) [Envelope Wrapper](EnvelopeWrapper.html) [Content Enricher](DataEnricher.html) [Content Filter](ContentFilter.html) [Claim Check](StoreInLibrary.html) [Normalizer](Normalizer.html) [Canonical Data Model](CanonicalDataModel.html) [Messaging Endpoints](MessagingEndpointsIntro.html) [Message Endpoint](MessageEndpoint.html) [Messaging Gateway](MessagingGateway.html) [Messaging Mapper](MessagingMapper.html) [Transactional Client](TransactionalClient.html) [Polling Consumer](PollingConsumer.html) [Event-driven Consumer](EventDrivenConsumer.html) [Competing Consumers](CompetingConsumers.html) [Message Dispatcher](MessageDispatcher.html) [Selective Consumer](MessageSelector.html) [Durable Subscriber](DurableSubscription.html) [Idempotent Receiver](IdempotentReceiver.html) [Service Activator](MessagingAdapter.html) [Messaging Channels](MessagingChannelsIntro.html) [Message Channel](MessageChannel.html) [Point-to-Point Channel](PointToPointChannel.html) [Publish-Subscr. Channel](PublishSubscribeChannel.html) [Datatype Channel](DatatypeChannel.html) [Invalid Message Channel](InvalidMessageChannel.html) [Dead Letter Channel](DeadLetterChannel.html) [Guaranteed Delivery](GuaranteedMessaging.html) [Channel Adapter](ChannelAdapter.html) [Messaging Bridge](MessagingBridge.html) [Message Bus](MessageBus.html) [Systems Mgmt.](SystemManagementIntro.html) [Control Bus](ControlBus.html) [Detour](Detour.html) [Wire Tap](WireTap.html) [Message History](MessageHistory.html) [Message Store](MessageStore.html) [Smart Proxy](SmartProxy.html) [Test Message](TestMessage.html) [Channel Purger](ChannelPurger.html)