Skip to content

Streaming Library: Telephony Channel - Bot websocket reconnections #6257

@p-nagpal

Description

@p-nagpal

Issue

While onboarding several customers to the Telephony speech channel, we have discovered various issues related to Telephony Channel-bot websocket connection drop. Even though channel automatically reconnects with bot under the hood, but there are some problems consequences of reconnection.

  1. When a websocket connection drops, the bot is unable to send message due to broken connection nor is it able to initiate a new connection. It must wait for the channel to initiate the connection to continue with the conversation.
  2. Once the channel detects the connection drop, it reestablishes the connection with bot. This approach does not work well for multi-instance bots as the channel might connect to a different instance during reconnect. For this approach to work, either the first bot instance needs to save the conversation state in shared store in case of failure and next instance needs to hydrate the conversation from stored state. Or the bot needs to have the mechanism to route the message to instance handling the conversation.

Proposed change

Provide design guidelines/samples for bot developers to build robust multi-instance bots with the streaming library / Telephony channel, including error handling.

Component Impact

TBD

Customer Impact

Customers are building in-house solutions to maintain state, implement ad-hoc bot back plane or just have a small rate of dropped messages due to websocket issues.

Tracking Status

Dotnet SDK TODO

  • PR
  • Merged

Javascript SDK TODO

  • PR
  • Merged

Python SDK TODO

  • PR
  • Merged

Java SDK TODO

  • PR
  • Merged

Samples TODO

  • PR
  • Merged

Docs TODO

  • PR
  • Merged

Tools TODO

  • PR
  • Merged

Metadata

Metadata

Assignees

Labels

Area: StreamingIssues related to streaming supportfeature-requestA request for new functionality or an enhancement to an existing one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions