This topic explains how to configure message proxies that either:
- Receive messages over the internal transport (a transport within the Virtual server) and send messages over the internal, HTTP, or MQ transport, OR
- Receive messages over the HTTP or MQ transport and send messages over the internal transport
In this section:
Why Use Internal Proxies?
Internal proxies relay traffic to (or from) virtual assets, MQ, HTTP, or other endpoints in a way that minimizes communication outside of the Virtualize server. This is especially useful when constructing complex composite assets with advanced processing behavior.
For example, assume you are establishing an intelligent routing service that directs incoming MQ traffic to either a live system, a virtual asset, a proxy for recording, or another endpoint. If MQ was used throughout, this would require a complex setup with many queues. You can minimize the number of queues (and thus optimize performance) by using MQ only for direct communications with MQ systems, then using the internal transport for all other routing:
You could then use Parasoft CTP to change the proxy’s routing "on-the-fly" based on the user, test scenario being executed, etc.
Internal proxies can forward traffic from:
- Internal (a virtual asset or another internal proxy) to internal
- Internal to MQ or HTTP
- MQ to internal
Configuring Internal to Internal Proxies
To configure an internal proxy to forward traffic to a virtual asset or another internal proxy:
- Ensure that Listen at (incoming)> Connection type is set to Internal.
- Under Listen at (incoming)> Proxy identifier, assign an identifier for this proxy.
- Under Forward to (outgoing), ensure that Connection type is set to Internal, then do one of the following:
- To forward to a virtual asset, select Virtual asset, then specify the full path to the virtual asset (from the Virtualize Server view). For a virtual asset at Virtual Assets> folder> name, you would enter
folder/name
. For a virtual asset at Virtual Assets> name, you would entername
. - To forward to an internal proxy, select Internal message proxy, then specify the proxy identifier assigned to that proxy.
- To forward to a virtual asset, select Virtual asset, then specify the full path to the virtual asset (from the Virtualize Server view). For a virtual asset at Virtual Assets> folder> name, you would enter
Configuring Internal to MQ/HTTP Proxies
To configure an internal proxy to forward traffic to an MQ or HTTP endpoint:
- Ensure that Listen at (incoming)> Connection type is set to Internal.
- Under Listen at (incoming)> Proxy identifier, assign an identifier for this proxy.
- Under Forward to (outgoing), set Connection type to the desired transport (MQ or HTTP), then complete the resulting controls. See HTTP Configuration and MQ Configuration for help on configuring the connections.
MQ Note
The standard MQ configuration options for Use replyToQueueName for response and Worker count are not applicable to internal proxies.
HTTP Note
The standard HTTP configuration option for Proxy listen path is not applicable to internal proxies. Instead, internal proxies provide a Path modifier configuration option. This option lets you specify how the proxy should modify incoming URLs. For example, if Path modifier is "/proxy" and the outgoing path is "service/abc", then an incoming URL "http://virt:9080/proxy/123" would be changed to "http://host:port/service/abc/123".
Configuring MQ to Internal Proxies
To configure an internal proxy to forward traffic from an MQ endpoint to an internal endpoint (proxy or virtual asset):
- Set Listen at (incoming)> Connection type to MQ.
- Under Connection type, complete the resulting controls. See MQ Configuration for help on configuring the connections.
- Under Forward to (outgoing), ensure that Connection type is set to Internal, then do one of the following:
- To forward to a virtual asset, select Virtual asset, then specify the full path to the virtual asset (from the Virtualize Server view). For a virtual asset at Virtual Assets> folder> name, you would enter
folder/name
. For a virtual asset at Virtual Assets> name, you would entername
. - To forward to an internal proxy, select Internal message proxy, then specify the proxy identifier assigned to that proxy.
- To forward to a virtual asset, select Virtual asset, then specify the full path to the virtual asset (from the Virtualize Server view). For a virtual asset at Virtual Assets> folder> name, you would enter