# Wire Tap

> Tap into message flow silently — copy messages for inspection without disrupting the main stream.

- **Category**: Integration
- **Subcategory**: System Management
- **Canonical URL**: https://designpattern.fyi/patterns/wire_tap/

---

## Description
Clean, reusable architecture pattern.


## Use Cases
Compliance audit — all financial transaction messages are tapped. Each transaction copy is sent to an immutable audit log channel consumed by a compliance store. Main processing flow is completely unaffected. Compliance team can query the audit log without touching the live system.





## Trade-offs


### Advantages

- Completely non-invasive — main flow is never affected

- No changes to producer or consumer needed

- Enables audit logging, monitoring, and debugging as infrastructure concerns

- Can be used for testing — tap production traffic to feed a test environment




### Considerations & Drawbacks

- Doubles message volume at the tap point — monitoring channel must handle the load

- Wire Tap failure should not affect the main flow — needs careful error isolation

- Sensitive data in messages appears in the monitoring channel — access control critical

- Always-on taps add processing overhead to every message







---
**Reference**: [Original Source](https://www.enterpriseintegrationpatterns.com/patterns/messaging/WireTap.html)

