> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Type alias CustomMessageHandler

Module: `noir_aztec::messages::discovery`

```rust
pub type CustomMessageHandler = unconstrained fn(AztecAddress, u64, u64, BoundedVec<Field, 11>, ResolvedTx, AztecAddress);
```

A handler for custom messages.

Contracts that emit custom messages (i.e. any with a message type that is not in [`crate::messages::msg_type`](/aztec-nr-api/v6.0.0/noir_aztec/messages/msg_type/index.md)) need to use [`crate::macros::AztecConfig::custom_message_handler`](/aztec-nr-api/v6.0.0/noir_aztec/macros/struct.AztecConfig.md#custom_message_handler) with a function of this type in order to process them. They will otherwise be **silently ignored**.
