The Message Forward tool can be attached to a Message Responder tool to forward messages to another endpoint (e.g.for example, the actual resource, an internal proxy, a virtual asset, etc.and so on). The response returned from the endpoint will be used as the response returned by the Message Responder.
...
If you want to use Message Forward to route a message to another endpoint when all other Message Responders in your Responder suite fail, set up your Responder suite with the appropriate Message Responders—some Responders, some that are configured to virtualize messages, and one last one that is configured to forward responses (acting as a catch-all).
...
- Right-click the related Message Responder tool , then and choose Add Output.
- Choose Forward> Traffic> All Tools> Forward > Traffic > All Tools > Message Forward.
- Configure the tool settings to specify where (to which endpoint) you want the message redirected.
- For details on Transport tab settings, see:
- If you want the tool to forward to a router endpoint on the local Virtualize server without consuming an HTTP connection, enter
localhost
,127.0.0.1
, or the special host namehost.virt.internal
. When usinglocalhost
or127.0.0.1
, the specified port must match the port Virtualize is deployed on; when usinghost.virt.internal
the port is not used. For example, a virtual asset deployed onhttp://localhost:9080/myVirtualAsset
can also be reached usinghttp://host.virt.internal/myVirtualAsset
. - With the default settings, this tool will use the applicable URL path segments and path parameters received by the attached Message Responder. This way, you do not need to hardcode them in the tool configuration. If you do not want this dynamic forwarding performed, clear the Forward incoming URL and path parameters option.
Note that:These forward paths are constructed using the same logic as HTTP message proxy forward paths. See Working with Message Proxies.
- If this option is enabled, the "listen path" that the message proxy uses is the attached Message Responder’s URL Path correlation condition; the "forward path" is the Router Endpoint in the Message Forward tool.
- Currently headers can only be overwritten in the HTTP transport. For example, MQMD headers and JMS property headers cannot be overwritten through the Message Forward tool.
- In the Misc tab, you can configure the timeout and valid HTTP response codes. If these metrics aren’t satisfied, an event will be reported to the Event Log available in the Parasoft Event Details perspective (to open this, choose Choose Window> Open Perspective> go to Window > Open Perspective > Other, then choose Parasoft Event Details in the Select Perspective dialog that opens).
- For details on Transport tab settings, see:
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
|
...
If your message proxies and/or Message Forward tools inadvertently set up a forwarding cycle like A> B> C> A > B > C > A, this could result in an infinite loop. To prevent such loops, Virtualize is configured to stop forwarding after 10 hops. You can change this by setting the system property parasoft.proxy.loop.max.limit
(e.g.for example, parasoft.proxy.loop.max.limit=5
).
Note that this loop detection applies only to internally - routed forwarding (e.g.for example, it applies to routing to localhost, not routing to a host name).