Message Routing Context Variables
The following table lists the predefined context variables related to message routing.
gateway90
The following table lists the predefined context variables related to message routing.
Variable | Description |
---|---|
${httpRouting.latency} | Returns the amount of time it took, in milliseconds, to send a request to its downstream endpoint and receive a response back. This variable is only available after a message has been routed. |
${httpRouting.reasonCode} | Returns one of the following reason codes when the HTTP routing fails:
When the HTTP routing succeeds, this variable returns the HTTP status, which is often the same as ${response.http.status} . |
${httpRouting.url} | Returns the Protected Service URL from the last routing assertion. This variable should be used after a routing assertion. When used without a suffix, the entire URL is returned. When used with one of the following optional suffixes, only that part of the URL is returned:
Examples: ${httpRouting.url} returns the entire Protected Service URL${httpRouting.url.host} returns only the host name portion of the URL The .file and . path suffixes usually return the same values. |
${rawtcp.reasonCode} | Sets the numeric value of the reason codes which are set regardless of the routing outcome. Below are the codes.
This variable returns a value only after the Route via Raw TCP Assertion has run. The variable is not populated during normal HTTP routing. |
${request.authorized} | Returns "true" if one of the following conditions apply, otherwise returns "false":
|
${request.completed} | Returns "true" if the service policy succeeded and routing completed successfully (or was absent from the policy); otherwise, returns "false". |
${request.elapsedTime} | Returns the amount of time, in milliseconds, between receiving the request and the time the assertion that uses the variable is executed. |
${request.routingTotalTime} | Returns the current cumulative time spend inside routing assertions since the request was received by the Gateway and the time the assertion that uses the variable is executed. |
${routingStatus} | Returns the routing status:
|