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.
This page (revision-7) was last changed on
12-Feb-09 14:31 PM, -0800
by Nikita.
This page was created on
24-Nov-08 13:29 PM, -0800 by Nikita.
More info...
| Version |
Date |
Author |
Size |
Changes ... |
|
11
|
21-Jul-09 07:03 AM, -0700
|
DerekFrankforth |
2171 |
to previous
|
|
10
|
21-Jul-09 07:00 AM, -0700
|
DerekFrankforth |
2053 |
to previous
|
to last
|
|
9
|
21-Jul-09 06:59 AM, -0700
|
DerekFrankforth |
2076 |
to previous
|
to last
|
|
8
|
02-Mar-09 10:58 AM, -0800
|
Nikita |
2281 |
to previous
|
to last
|
|
7
|
12-Feb-09 14:31 PM, -0800
|
Nikita |
2279 |
to previous
|
to last
|
|
6
|
08-Dec-08 14:26 PM, -0800
|
KeithBabo |
2161 |
to previous
|
to last
|
|
5
|
05-Dec-08 15:10 PM, -0800
|
Nikita |
2169 |
to previous
|
to last
|
|
4
|
05-Dec-08 15:04 PM, -0800
|
Nikita |
1872 |
to previous
|
to last
|
|
3
|
24-Nov-08 14:14 PM, -0800
|
Nikita |
8911 |
to previous
|
to last
|
|
2
|
24-Nov-08 13:59 PM, -0800
|
Nikita |
8568 |
to previous
|
to last
|
|
1
|
24-Nov-08 13:29 PM, -0800
|
Nikita |
8118 |
to last
|