Kazoo provides a mechanism,
kz_hooks, for Kazoo applications to receive call events without needing to setup an AMQP queue and binding. This reduces AMQP usage by establishing a single AMQP queue and bindings and using internal VM message passing and function calling to distribute to the interested processes.
There are three ways to ask for call events from
kz_hooks:registerwill register the calling PID to receive a copy of the message from the "unique" hooks AMQP queue (all VMs will receive the payloads)
kz_hooks:register_rrwill register using the "named" AMQP queue which will effectively round-robin the payloads within the zone.
kz_hooks:bindwill allow the caller to specify the
M:F/Aor a local function to be called on event reception from the "unique" AMQP queue.