Documentation - v1.2.0-alpha.3
    Preparing search index...

    Defines the priority ranking for route evaluation in the agent hosting framework.

    Routes are evaluated in ascending order of their rank values, allowing for precise control over which routes are processed first when multiple routes could match the same request.

    // High priority route that should be evaluated first
    this.onMessage('urgent', handler, undefined, RouteRank.First);

    // Normal priority route with default ranking
    this.onMessage('data', handler, undefined, RouteRank.Unspecified);

    // Fallback route that should be evaluated last
    this.onActivity('message', fallbackHandler, undefined, RouteRank.Last);

    // Multiple routes with same pattern - first ranked executes first
    this.onMessage('dupText', handler1, undefined, RouteRank.Last);
    this.onMessage('dupText', handler2, undefined, RouteRank.First); // This executes first
    Index

    Enumeration Members

    Enumeration Members

    First: 0

    Highest priority rank (value: 0).

    Routes with this rank are evaluated before any other routes. Use this for critical routes that must take precedence over all others, such as high-priority message handlers or override handlers that should execute before any other matching routes.

    Last: number

    Lowest priority rank (value: Number.MAX_VALUE).

    Routes with this rank are evaluated last, after all other routes have been considered. Ideal for catch-all message handlers, fallback activity handlers, or default responses that should only match when no other routes apply.

    Unspecified: number

    Default priority rank (value: Number.MAX_VALUE / 2).

    This is the standard rank for most routes that don't require special ordering. Routes with this rank are evaluated after high-priority routes but before low-priority ones. Use this when you don't need to specify a particular evaluation order.