Skip to content

Is getting messages in order possible? #402

@mike-deem-uipath

Description

@mike-deem-uipath

Is there any way to get messages from a web socket in order in c#? Based on my understanding and testing, since web socket transport uses ConfigureAwait(continueOnCapturedContext: false) handlers are dispatched on arbitrary threads with no way to ensure that they are executed in the same order as the messages read from the web socket.

This is a problem when processing ordered streams of messages as needed to work with the newer voice enabled LLM apis, for example. In my case, events are streamed from the browser to a C# service, and forwarded to the LLM's API. But the event handlers are called out of order on occasion, causing garbled voice input and output streams.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions