Destination Router filter


The Destination Router filter will add a possible routing destination at a configured quality. After all filters in the filter chain have finished processing the request, Repose will choose the destination which has the highest quality.

General filter information

Filter name: destination-router

Filter configuration: destination-router.cfg.xml  

Released: version 2.0.0

Configuring the Destination Router filter

The destination router configuration contains a target element with two attributes: id and quality. The id specified must match an id of a destination for this service domain. The router will add this id at the specified quality to the list of possible routing destinations for this request.

Quality factorsQuality factors are used when determining the best routing destination. For more information on quality factors, see header value quality. The quality factor of a target is a decimal number that must be greater than 0 and less than or equal to 1.0.

Routing logic

In the configuration above, we assign the target destination id to be "openrepose" with a quality of 0.5. The destination router will add this id to the list of possible routing destinations with a quality of 0.5 for this request.

Once the filter chain exits, Repose will evaluate all of the route destinations that have been added to the request and will choose the destination id that has the highest quality. Repose will look up the destination information in the system-model.cfg.xml and determine all of the routing information to build an appropriate destination URL. The request is then forwarded through a request dispatcher.

Configurable parameters

XML schema definition

Example configuration 

The destination-router.cfg.xml file contains the following elements and attributes. Add the filter to your Repose deployment through the system model configuration.




<destination-router>-RequiredSpecifies the sub-elements and attributes to define your destination router configuration.
Defines a collection of servlet context routing destinations and their associated quality factors.
idRequiredDefines a destination id within the service domain.
qualityOptionalQuality of this destination.

Return codes and conditions

This filter does not return specific response codes. The request will simply pass through to the next filter or to the origin service.

Request headers created

The Destination Router filter does not create any request headers.