MCP TypeScript SDK (V2)
    Preparing search index...

    Class InMemoryTaskMessageQueueExperimental

    In-memory TaskMessageQueue implementation for development and testing. For production, use Redis or another distributed queue.

    Implements

    Index

    Constructors

    Methods

    • Experimental

      Adds a message to the end of the queue for a specific task. Atomically checks queue size and throws if maxSize would be exceeded.

      Parameters

      • taskId: string

        The task identifier

      • message: QueuedMessage

        The message to enqueue

      • OptionalsessionId: string

        Optional session ID for binding the operation to a specific session

      • OptionalmaxSize: number

        Optional maximum queue size - if specified and queue is full, throws an error

      Returns Promise<void>

      Error if maxSize is specified and would be exceeded