9.42.2 HTTP/2 Client Agent

The HTTP/2 Client agent allows you to configure an HTTP client in a real-time workflow. The agent sends requests by converting the UDRs to HTTP 2 requests, and then receives the responses which are then routed into the workflow. 

The agent can be used for both HTTP/1 and HTTP/2.

To be able to use the HTTP/2 Client agent, this processing agent must be preceded by an Analysis agent in the workflow that you create. The APL code must include a RequestCycle object as shown in the example APL code below. In the APL code, you must ensure that req.secure is set to true and that req.httpVersion is set to http2.

consume {
    http.RequestCycle req = udrCreate(http.RequestCycle);
    req.host = "myserver";
    req.port = "8181";
    req.secure = true;
    req.httpVersion = "http2";
    req.path = "/nf-instance";
    req.method = "GET";
    debug("sending request"+req);
    udrRoute(req);
}

Prerequisites

The reader of this information should be familiar with:

Configuration

The agent consists of the Client tab.

Client Tab

The Client tab contains the following settings:

SettingDescription
Use SSLIf you want to use SSL, select this checkbox.
Security ProfileIf you have selected to use SSL, select which 8.17 Security Profile you want the agent to use.
Request Timeout (sec)Enter the timeout period in seconds for the request to the HTTP/2 client to wait for a response before timing out.
Max Requests Queued Per Destination

The size of the message queue in the Jetty server. Default is 20000.

Note!

Use this property to manage the memory usage. It is recommended that the EC or ECD running the workflow have xmx that is at the minimum (message size X queue size), otherwise there is a risk for out of memory errors.

Retry Interval For full Queues (ms)A millisecond value to indicate the time it will take for the request to try again when the queue is full.
Max Retries For Full QueueWhen the Route Error UDR option is checked, this field will be enabled. This field will indicate how many times the request will attempt to retry before routing it to Error UDR.
Route Error UDRIf this check box is ticked, the request will attempt to be received by the agent until it reached the maximum amount of retries. Once the threshold is reached, the request will be stored in an Error UDR and sent as an output from the HTTP/2 client agent. If the check box is not ticked the request will attempt the retries for an indefinite amount of time, until the workflow is terminated.

OpenAPI/5G

The OpenAPI/5G tab contains the following settings:

SettingDescription
Use OpenAPI ProfileIf you want the agent to use an OpenAPI profile, select this check box.
OpenAPI ProfileIf you have selected Use OpenAPI Profile, select which OpenAPI profile you want the agent to use.
Enable Validation

If you want to validate the OpenAPI profile, select this check box.

Note!

Turning this option ON will have a very significant performance impact on the overall performance of the flow. When validation is enabled, each payload will be validated against the Open API schema, an operation that can be very resource-intensive. We recommend to only enable this setting during development and testing and to disable it in a stable production environment.

Input/Output Data

Input Data

9.41.3.6 RequestCycle

Output Data

9.41.3.6 RequestCycle