This documentation is for WSO2 ESB version 4.0.2. View documentation for the latest release.

Endpoints

An endpoint defines an external destination for an outgoing message through WSO2 ESB. An <endpoint> element defines an endpoint in the configuration. An endpoint may be specified as an address endpoint, WSDL based endpoint, a load balancing endpoint or a fail-over endpoint as follows:

<endpoint [name="string"] [key="string"]>
        address-endpoint | default-endpoint | wsdl-endpoint | load-balanced-endpoint | fail-over-endpoint
</endpoint>

All the types of endpoints can have a name attribute which specify the name of the endpoint and such named endpoints can be referred by other endpoints using a key attribute. For example, if there is an endpoint named as "foo," the following endpoint can be used in any place, where "foo" has to be used.

<endpoint key="foo"/>

This let the users to reuse the already defined endpoints in several places.

The endpoints also have a trace attribute, which turns on detailed trace information for messages being sent to the endpoint. These are available in the trace.log configured via the log4j.properties file (which can be found within lib folder once you unzip wso2 ESB ZIP). Setting the trace log level to TRACE will dump detailed trace information including message payloads.

At any given time an endpoint can be one of the following four states:

  • Active - Endpoint is active and running.
  • TimeOut - The endpoint can be in "TimeOut" state if we get a timeout error when invoking the endpoint (because the endpoint is currently unavailable or due to a network failure) or if it returns a previously defined error code for timeout state, the endpoint said to be in "TimeOut" state. The possible error codes can be found in the SynapseConstant class (under the endpoint failure section). A timed out endpoint is a candidate for a suspension. The configuration related to marking an endpoint for suspension is given by markForSuspension.If the configuration does have a positive retrieve count (see the configuration section below) the endpoint will be retrieve again (the number of time to retrieve can be configured using the same configuration element) and if it fails in further attempts it will transfer into "Suspended" state.
  • Suspended - When invoking the endpoint if a previously defined error code for "Suspended" state is returned or a if a "TimeOut" endpoint fails in further attempts, the endpoint is said to be in "Suspended" state. The endpoint can goes into "Active" state once the suspend duration is over. The configuration section called suspendOnFailure.
  • Switch Off - The endpoint is moved into maintains mode.

A state transfer between any state to Switch off state can be done only manually using JMX based API. And also an endpoint which is in "SwitchOff" state can only transfer into "Active" state again using the JMX based API.

Endpoints can be added, edited, and deleted. You can also enable statistics for Address and WSDL endpoints.