# `Kombu.Pidbox.Node`
[🔗](https://github.com/hacktobeer/kombu/blob/v0.1.0/lib/kombu/pidbox.ex#L429)

Mailbox node routing and command dispatcher (`kombu.pidbox.Node`).

# `t`

```elixir
@type t() :: %Kombu.Pidbox.Node{
  channel: term(),
  handlers: term(),
  hostname: term(),
  mailbox: term(),
  state: term()
}
```

# `consumer`

```elixir
@spec consumer(t(), keyword()) :: Kombu.Consumer.t()
```

Creates a `Consumer` on this node's mailbox queue.

# `dispatch`

```elixir
@spec dispatch(t(), String.t(), map(), map() | nil, String.t() | nil, keyword()) ::
  term()
```

Executes the registered handler for `method` and sends reply if requested.

# `handle_message`

```elixir
@spec handle_message(t(), map(), Kombu.Message.t() | nil) :: term()
```

Dispatches incoming message if directed to this node.

# `handler`

```elixir
@spec handler(t(), String.t() | atom(), (term(), map() -&gt; term())) :: t()
```

Registers a command handler under `name`.
`fun` receives `(state, kwargs)`.

# `listen`

```elixir
@spec listen(t(), keyword()) :: Kombu.Consumer.t()
```

Starts consuming from the mailbox queue.

# `new`

```elixir
@spec new(String.t(), Kombu.Pidbox.Mailbox.t(), keyword()) :: t()
```

# `reply`

```elixir
@spec reply(t(), term(), String.t(), String.t(), String.t(), keyword()) :: :ok
```

Sends reply back to caller via mailbox.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
