...
Endpoint states in detail:
State | Description |
---|---|
Endpoint is up and running. | |
Endpoint encountered an error, it is a candidate for suspension. If it continues to encounter errors, it will be suspended. It can still send messages. | |
Endpoint encountered errors and is sent to a state where it cannot send requests. It cannot send messages and messages coming to it will result in a fault. | |
OFF | Endpoint is not active. |
Active
Anchor | ||||
---|---|---|---|---|
|
When WSO2 Enterprise Service Bus boots up, endpoints are in the "Active" state and ready to send messages. If the user does not put the endpoint into OFF state, it will be in the "Active" state until an error occurs.
...
Code Block |
---|
<address uri="endpoint address" [format="soap11|soap12|pox|get"] [optimize="mtom|swa"] [encoding="charset encoding"] [statistics="enable|disable"] [trace="enable|disable"]> <enableRM [policy="key"]/>? <enableSec [policy="key"]/>? <enableAddressing [version="final|submission"] [separateListener="true|false"]/>? <timeout> <duration>timeout duration in seconds</duration> <responseAction>discard|fault<fault|never</responseAction> </timeout>? <markForSuspension> [<errorCodes>xxx,yyy</errorCodes>] <retriesBeforeSuspension>m</retriesBeforeSuspension> <retryDelay>d</retryDelay> </markForSuspension> <suspendOnFailure> [<errorCodes>xxx,yyy</errorCodes>] <initialDuration>n</initialDuration> <progressionFactor>r</progressionFactor> <maximumDuration>l</maximumDuration> </suspendOnFailure> </address> |
"Timeout" Settings
Anchor | ||||
---|---|---|---|---|
|
Name | Values | Default | Description |
---|---|---|---|
duration | Miliseconds | 60000 | Connection timeout interval. If a the remote endpoint does not respond in this time, it will be treated as a "Timeout." |
responseAction | discard, fault, |
never |
never | When a response comes to a timed out request, weather to discard it or invoke the fault handler. If you select "never", the endpoint remains in the "Active" state. |
"MarkForSuspension" Settings
Anchor | ||||
---|---|---|---|---|
|
Name | Values | Default | Description |
---|---|---|---|
errorCodes | Comma separated list of error codes | 101504, 101505 | Errors to send the endpoint into the "Timeout" state |
retriesBeforeSuspension | Integer | 0 | In the "Timeout" state this number of requests minus one can be tried and can be failed before endpoint is marked as "Suspended" |
retryDelay |
'suspenOnFailure' settings
Anchor | ||||
---|---|---|---|---|
|
Name | Values | Default | Description |
---|---|---|---|
errorCodes | Comma separated list of error codes | All the errors except the errors specified in | Errors to send the endpoint in to the "Suspended" state. |
initialDuration | milliseconds | 60 x 60 x 1000 | After an endpoint gets "Suspended," it will wait for this amount of time before trying to send the messages coming to it. All the messages coming during this time period will result in fault sequence activation. |
progressionFactor | Integer | 1 | The endpoint will try to send the messages after the |
maximumDuration | milliseconds | Long.MAX_VALUE | Upper bound of retry duration. |
Sample Configuration:
Code Block |
---|
<endpoint name="Sample_First" statistics="enable" > <address uri="http://localhost/myendpoint" statistics="enable" trace="disable"> <timeout> <duration>60000</duration> </timeout> <markForSuspension> <errorCodes>101504, 101505</errorCodes> <retriesBeforeSuspension>3</retriesBeforeSuspension> <retryDelay>1</retryDelay> </markForSuspension> <suspendOnFailure> <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes> <initialDuration>1000</initialDuration> <progressionFactor>2</progressionFactor> <maximumDuration>64000</maximumDuration> </suspendOnFailure> </address> </endpoint> |
...
Error Codes
Anchor | ||||
---|---|---|---|---|
|
Error code | Description |
---|---|
101000 | Receiver IO error sending |
101001 | Receiver IO error receiving |
101500 | Sender IO error sending |
101501 | Sender IO error receiving |
101503 | Connection failed |
101504 | Connection timed out |
101505 | Connection closed |
101506 | HTTP protocol violation |
101507 | Connect cancel |
101508 | Connect timeout |
101509 | Send abort |
Excerpt | ||
---|---|---|
| ||
Instructions on how to handle endpoint errors in WSO2 ESB. |