Wire Tap — Routes a copy of a message to a secondary destination while passing the original message to the actual recipient, or it creates a new message and passes that to the recipient.
The Wire Tap pattern has two modes of operation:
Tap mode—makes a shallow copy of the message exchange and directs the copy to a secondary location. The original exchange continues to the next step in the route.
New message mode—creates a new message exchange by setting the message body and setting one or more message headers. The new exchange is passed to the next step in the route.
The Wire Tap pattern can be placed anywhere in the route body.
Table 32 describes the properties you can specify using the properties editor.
Table 32. Wire Tap Properties
| Name | Description |
|---|---|
| Uri | Specifies the URI of the endpoint to which the copy is routed. See Components Overview for a list of valid URI patterns. |
| Language | Specifies the expression language used to process the expression. |
| Cache Size | Sets the maximum size used by the
org.apache.camel.impl.ConsumerCache, which is used to cache and reuse
producers. |
| Copy | Specifies whether the original message is copied into the new message. The
default is Enabled. |
| Description | Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel. |
| Executor Service Ref | Specifies a reference for looking up the
executorService to use for
thread pool management. |
| Id | Specifies a unique identifier for the endpoint. The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id. You can use the id to refer to endpoints in your Camel XML file. |
Ignore Invalid Endpoint | Ignore the InvalidEndpointException when trying to create a producer
with that endpoint. |
| On Prepare Ref |
Specifies a reference to a bean implementing a custom This property enables you to deep clone mutable message bodies, preserving an entire exchange as a separate entity. You can use this property to execute any kind of logic on a message exchange. |
Pattern | Sets the optional ExchangePattern used to invoke this
endpoint. |
| Processor Ref | Specifies a reference to a bean implementing a message processor to process the original message before it is passed to the next step in the route. |