---
url: /reference/functions/async.md
---

# Async

本文档介绍如何在 Nexus 应用中实现异步消息队列。异步消息队列的一个典型场景是，某个应用包含一个运行时间超过 Nexus 函数上限的函数，如导入功能。该应用可以使用异步消息队列 APIs 将事件发送到具有更长运行时间的消费者函数，从而在后台异步执行它们。

## 安装

```powershell
npm install @pc-nexus/async
```

导入：

```javascript
import { queue } from "@pc-nexus/async";
```

## APIs

Async APIs 提供的能力如下：
