# 实时消息 RTM 概览 (/zh-CN/realtime-media/rtm)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

## RTM 是什么？ [#rtm-是什么]

**实时消息**（Real-Time Messaging，RTM）为开发者提供一整套低延时、高并发、可扩展、高可靠的实时消息及状态同步解决方案。RTM 负责管理应用程序实时通信层所需的基础设施。为方便用户开发与创新，RTM 在保障 99.95% 的 SLA 正常运行时间的同时，提供丰富的 Demo App 及开放的第三方 API 扩展。

## 开始构建 [#开始构建]

### 平台文档 [#平台文档]

选择开发平台，直接进入对应 SDK 的快速开始。

<Cards columns={4} className="gap-2" style={{ gridTemplateColumns: 'repeat(auto-fit, minmax(min(100%, 9.75rem), 1fr))' }}>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/web">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/js.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">JavaScript</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/android">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/java.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">Java</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/ios">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/ios.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">Objective-C</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/swift">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/ios.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">Swift</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/cpp">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/cpp.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">C++</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/harmonyos">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/harmonyOS.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">HarmonyOS</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/unity">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/unity.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">Unity</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/flutter">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://web-cdn.agora.io/docs-portal/img/api-reference/platforms/flutter.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">Flutter</span>
  </a>
  <a data-card className="group inline-flex max-w-full items-center gap-2.5 rounded-md border border-border bg-background px-3 py-2 text-sm transition-colors hover:border-foreground/20 hover:bg-muted/30" style={{ minHeight: '3.5rem' }} href="/zh-CN/realtime-media/rtm/get-started/quick-start/mini-program">
    <span aria-hidden="true" className="size-7 shrink-0 rounded-md" style={{ backgroundImage: 'url(https://assets-docs.agora.io/images/api-reference/platforms/min-program.svg)', backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'contain' }} />
    <span className="truncate font-medium text-foreground">小程序（Beta）</span>
  </a>
</Cards>

**更多入口**

<Cards>
  <Card title="下载 SDK" href="/zh-CN/reference/sdks?product=signaling" description="按平台选择 RTM SDK 和可用历史版本。" />
  <Card title="小程序 SDK（Beta）" href="https://www.npmjs.com/package/shengwang-rtm-miniapp" description="包名：shengwang-rtm-miniapp；最新版本：2.3.0-beta.0；发布日期：2026 年 7 月 16 日。" />
  <Card title="构建功能" href="/zh-CN/realtime-media/rtm/build/rtm-initialization/application-setup" description="配置应用、管理频道、发送消息并接入鉴权。" />
  <Card title="客户端 API" href="/zh-CN/api-reference/api?product=rtm&apiType=client" description="按平台查找全部 RTM 客户端接口。" />
  <Card title="参考信息" href="/zh-CN/realtime-media/rtm/reference/release-notes" description="查看版本、平台支持、错误码、配额和迁移说明。" />
</Cards>

## 在线体验 RTM [#在线体验-rtm]

<OverviewImageCard
  layout="horizontal"
  newTabLabel="在新标签页打开"
  title="先在线体验 RTM"
  description="无需下载代码，在浏览器里体验各场景的实时信令和数据流。"
  href="https://rtm-demo.shengwang.cn?utm_source=docs&utm_medium=rtm_overview"
  imageAlt="RTM 在线体验：语聊房与 1V1 呼叫邀请场景，展示实时 API 调用和事件"
  imageSrc="/img/rtm2/online-demo.jpg"
  imageAspectRatio={1.75}
/>

## RTM 应用场景 [#rtm-应用场景]

RTM 可用于以下类型的实时互动场景：

- **互动直播和语聊房**：同步麦位、礼物、弹幕、房间公告、连麦邀请和主播状态。
- **在线教育和协同办公**：同步课堂状态、课件进度、举手、成员状态和协作控制指令。
- **互动游戏和元宇宙**：同步玩家状态、轻量级游戏事件、房间状态和实时互动指令。
- **IoT 和智能设备**：同步设备在线状态、控制指令、告警消息和设备侧事件。
- **远程医疗、交通运输和金融科技**：同步业务状态、流程节点、位置更新和安全相关事件。

## 套餐选择 [#套餐选择]

<PlanCards
  plans={[
    {
      name: '体验套餐',
      description: '适合免费试用和验证产品能力。',
      accent: 'blue',
      features: [
        '包含每月消息数、峰值连接数和存储容量等基础额度。',
        '适合 PoC、Demo 和小规模内部测试。',
        '可在用量增长后平滑评估升级到自助套餐。',
      ],
      cta: {
        label: '查看计费说明',
        href: '/zh-CN/realtime-media/rtm/reference/billing/billing-strategy',
      },
    },
    {
      name: '自助套餐',
      description: '适合业务增长阶段，兼顾灵活用量和服务保障。',
      accent: 'green',
      badge: '推荐',
      features: [
        '支持按业务规模选择更合适的套餐额度。',
        '覆盖线上业务需要的服务支持和 SLA 保障。',
        '适合稳定增长的消息、Presence 和状态同步场景。',
      ],
      cta: {
        label: '比较套餐权益',
        href: '/zh-CN/realtime-media/rtm/reference/billing/billing-strategy',
      },
    },
    {
      name: '企业套餐',
      description: '适合高服务支持、架构指导、用量折扣和合规需求。',
      accent: 'purple',
      features: [
        '可结合项目规模获取架构方案和容量规划建议。',
        '支持更高服务支持等级、商务折扣和定制化诉求。',
        '适合复杂生产环境、大规模连接和重点项目上线。',
      ],
      cta: {
        label: '联系商务支持',
        href: 'https://www.agora.io/cn/contact-sales/',
      },
    },
  ]}
/>

<Cards>
  <Card
    className="col-span-full"
    title="计费说明"
    href="/zh-CN/realtime-media/rtm/reference/billing/billing-strategy"
    description="了解关于价格、套餐及服务的更多信息。"
  />
</Cards>

## 阅读路径 [#阅读路径]

如果你首次集成 RTM，请先完成[快速开始](/zh-CN/realtime-media/rtm/get-started/quick-start)，跑通登录和收发消息。进入生产环境前，继续完成[应用配置](/zh-CN/realtime-media/rtm/build/rtm-initialization/application-setup)、[Token 鉴权](/zh-CN/realtime-media/rtm/build/authentication-and-connection/token-generation)和[平台支持](/zh-CN/realtime-media/rtm/reference/capabilities-and-compatibility/platform-support)检查。

如果你是 RTM 旧版本用户，想升级至 v2，请先阅读[迁移指南](/zh-CN/realtime-media/rtm/reference/migration-guide)，再对照当前 SDK 的频道、消息、Presence、Storage 和 Topic 能力调整实现。

## 下一步 [#下一步]

- 查看 [RTM 计费说明](/zh-CN/realtime-media/rtm/reference/billing/billing-strategy)，了解套餐额度、权益和后续计费表之间的关系。
- 查看 [配额限制](/zh-CN/realtime-media/rtm/reference/usage-limits-and-errors/api-limits)，确认你的业务规模是否需要提前申请更高配额。
- 查看 [常见问题](/zh-CN/reference/faq/integration?product=实时消息)，排查登录、消息收发、Token、频道、Presence、Storage 或旧版本迁移相关问题。
