Index Changes
This is version 8. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
Fuji Home

Enterprise Integration Patterns - Wire Tap

Overview

The purpose of the Wire Tap pattern (also known as Tee) is to tap into a message path, make a copy of the original message for alternate independent processing and let the original message flow (unmodified) to the original recipient. This is very useful in cases when a snapshot of a message needs to be taken without altering/disturbing the original message flow.

Use Cases

The wire tap pattern has several applications in the integration space.

Logging

Requests/responses to/from a service can be logged, these logged messages can then be used for billing etc.

Monitoring & Analysis

Message requests to a particular service can be monitored easily using the tee. For example, all requests to an order processing service could be monitored and analyzed, high value orders can be forwarded to a special order processing department for further processing.

Parallel Independent processing

Tee can be used to start parallel independent routes to process the incoming message. For instance a service that keeps track of user preferences can be tee'd all catalog browsing requests from a client, this service can then identify the client interest and suggest recommendations in real-time, while the user is browsing the catalog.

Syntax

tee [route-name | embedded-route]
route-name := name identifying a route

Examples

Tee with embedded route
route do
   from "inbound"
   tee do
      route to "log-service"
   end 
   to "po-process"
end

Tee with a route name

route do
   from "inbound"
   tee "log"
   to "po-process"
end

route "log" do
   to "po-process" 
end

Note: Check if route w/o a from is processed correctly

Inserting a tee in a route should not affect the original route. For example if execution of the "log" route fails for some reason, the message from "inbound" should be routed to "po-process". The intention of the Tee is to get a snapshot of the message exchange and process it independently.

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This particular version was published on 02-Mar-09 10:58 AM, -0800 by Nikita