--- url: "http://www.enterpriseintegrationpatterns.com/RoutingTable.html" titulek: "Routing Slip - Enterprise Integration Patterns" h1: "" popis: "How do we route a message consecutively through a series of processing steps when the sequence of steps is not known at design-time and may vary for each message?" jazyk: "en" kanonicka: "" drobecky: [] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-15 15:34:22" znaku: 5536 slov: 556 kodovani: "utf-8" sha256: "5e46ed0bbff9cbd9b7d56986a778230fcbffd4de408735b71e34b93b428844cd" --- | | Routing Slip[Messaging Patterns](index.html) » [Message Routing](MessageRoutingIntro.html) | [Contents](toc.html)[⇐ Prev](BroadcastAggregate.html)[Next ⇒](ProcessManager.html) | | --- | --- | --- | Most of the routing patterns presented in this section route incoming messages to one or more destinations based on a set of rules. Sometimes, though, we need to route a message not just to a single component, but through a whole series of components. Let's assume, for example, that we use a [*Pipes and Filters*](PipesAndFilters.html) architecture to process incoming messages that have to undergo a sequence of processing steps and business rule validations. Since the nature of the validations varies widely and may depend on external systems (e.g., credit card validations), we implement each type of step as a separate filter. Each filter inspects the incoming message, and applies the business rule(s) to the message. If the message does not fulfill the conditions specified by the rules it is routed to an exception channel. The channels between the filters determine the sequence of validations that the message needs to undergo. Now let's assume, though, that the set of validations to perform against each message depends on the message type (for example, purchase order request do not need credit card validation or customers who send orders over a VPN may not require decryption and authentication). To accommodate this requirement we need to find a configuration that can route the message through a different sequence of filters depending on the type of the message. How do we route a message consecutively through a series of processing steps when the sequence of steps is not known at design-time and may vary for each message? Attach a *Routing Slip* to each message, specifying the sequence of processing steps. Wrap each component with a special message router that reads the *Routing Slip* and routes the message to the next component in the list. We insert a special component into the beginning of the process that computes the list of required steps for each message. It then attaches the list as a *Routing Slip* to the message and starts the process by routing the message to the first processing step. After successful processing, each processing step looks at the *Routing Slip* and passes the message to the next processing step specified in the routing table. ... Read the entire pattern in the book [Enterprise Integration Patterns](/books1.html) **Related patterns:** [*Content-Based Router*](ContentBasedRouter.html), [*Message Filter*](Filter.html), [*Message Router*](MessageRouter.html), [*Pipes and Filters*](PipesAndFilters.html), [*Process Manager*](ProcessManager.html), [*Publish-Subscribe Channel*](PublishSubscribeChannel.html), [*Return Address*](ReturnAddress.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)