Skip to content

[v1.2] Add reconnection example to examples/python.md (and parity for examples/node.md) #116

@MaxMansfield

Description

@MaxMansfield

Context

examples/python.md has no reconnection example. The closest reference is zoom/rtms-samples/rtms_api/reconnection_and_chaos_mode_js which uses raw WebSockets. A Python equivalent using the SDK's callbacks (on_media_connection_interrupted) doesn't exist in our docs.

Anyone deploying RTMS to a real production environment hits all three reconnection scenarios from Zoom's docs (https://developers.zoom.us/docs/rtms/meetings/work-with-streams/#failover-and-reconnection). Without a blessed example, every customer reinvents the pattern and most get it subtly wrong.

A working reference implementation already exists in the rtms-on-AWS Terraform template's worker/main.py (built 2026-05-20 by @MaxMansfield).

What to ship

Add a "Reconnection" section to examples/python.md (between the existing media callbacks and asyncio sections). Cover all three Zoom scenarios using SDK callbacks (not raw WS):

Scenario Trigger Handler
1. RTMS server failure meeting.rtms_started arrives for an existing rtms_stream_id with new server_urls leave old client, join with new payload
2. Signal connection down meeting.rtms_interrupted webhook tear down and rejoin with the webhook's fresh credentials
3. Media connection down on_media_connection_interrupted callback re-issue client.join(stored_payload) with exponential backoff

Code sample: take the working pattern from terraform-template/worker/main.py (_schedule_media_reconnect, handle_interrupted, start_meeting's server-failure detection). Exponential backoff: 3s × 2^n capped at 30s, max 5 attempts.

Acceptance criteria

  • New "Reconnection" section in examples/python.md
  • All three Zoom scenarios covered with runnable code
  • Reference to the official Zoom failover docs URL
  • State machine for tracking stored payloads per stream_id documented

Cross-language parity

  • Add the equivalent "Reconnection" section to examples/node.md with the JS equivalent of the same patterns
  • Same scenario table and same handler shapes
  • PR description includes "Cross-language parity check" section

Source

Tracked in vault: Projects/RTMS SDK v1.2.md → DEVS-X4. Reference implementation: terraform-template/worker/main.py from the 2026-05-20 AWS deploy work.

Tracker

Part of the v1.2 milestone. Project: https://github.com/orgs/zoom/projects/11.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationlanguage parityRequires parallel implementation in Node.js and Python with parity check in PRv1.2Part of the v1.2 release

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions