The wire tap pattern enables you to monitor the messages passing through a channel by duplicating the message stream: one copy of the stream is forwarded to the main channel and another copy of the stream is forwarded to the tap endpoint, which monitors the stream.
The following example shows how to route a request from an input queue:a
endpoint to the wire tap location queue:tap
before it
is received by queue:b
.
RouteBuilder builder = new RouteBuilder() { public void configure() { from("seda:a").to("seda:tap", "seda:b"); } };