...
- unroutedMessagePolicy - applies to all Exchanges starting with 'ex.router'. If the message is unouted by the Exchange, it will be sent to the 'alternate exchange' :
sys.ex.unrouted
- messageTimeoutPolicy - applies to all Queues starting with 'q'. If the message is left unprocessed on the Queue after 30 seconds, it will be sent to the 'dead-lettter-exchange' :
sys.ex.dead.letter
.
Notes about the Demo configuration
The naming of resources is important - this ensures application Queues and Exchanges are separated out from System Queues and Exchanges. For example messages on the sys.q.dead.letter.01
don't have a TTL but those on q.type1
and q.type2
do.
We've had to use 2 exchanges ex.entry.point
and ex.router.main
. The reason for this is that if have a single exchange from which we copy every message to audit - this will stop messages from appearing unrouted even if they only go to the audit queue.
The functionality covered by the 2 policies could be defined on each Queue but this is easy to get wrong. Using policies reduces overhead and increases quality.
Instructions for setting up the demo and exploring its features
...