Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 866 Bytes

exchange_decorators.md

File metadata and controls

18 lines (14 loc) · 866 Bytes

Exchange Decorators

Exchange decorators are modules implemented as behaviours that can let you extend existing exchanges. For example, you might want to perform some actions only when the exchange is created, or deleted, but leave alone the whole routing logic to the underlying exchange.

Decorators are usually associated with exchanges via policies.

See the active_for/1 callback to understand which functions on the exchange would be decorated.

Take a look at the Sharding Plugin and the Federation Plugin to see how exchange decorators are implemented.