问题
I have JMS queue message processor sequence where request is send to SOAP endpoint. However request to this endpoint can take a long time, up to 30 minutes or so. How can I can configure ESB to allow long timeout values ? Currently I'm getting following error after 60 seconds:
[2014-01-20 14:18:31,772] WARN - TargetHandler http-outgoing-4: Connection time out while in state: REQUEST_DONE
[2014-01-20 14:18:31,775] WARN - SynapseCallbackReceiver Synapse received a response for the request with message Id : urn:uuid:c6a023c2-7fb4-4321-b1c2-d78e9bb13add But a callback is not registered (anymore) to process this response
Thanks for any help
Edit: I added http.socket.timeout=1800000 -property in repository/conf/passthru-http.properties which seems to solve the timeout issue.
回答1:
Assuming this is a "Scheduled Message Forwarding Processor", to increase the send timeout up to 30 minutes :
- In your endpoint, verify that "connection timeout" is "never timeout" (edit the endpoint in the console and "Show Advanced options")
- Edit repository/conf/synapse.properties and modify synapse.global_timeout_interval (in ms) : this is the maximum time a callback instance will exist in wso2 to receive the response
- copy the sample axis2 conf file from samples/axis2Client/client_repo/conf/axis2.xml to, for example, repository/conf/axis2/axis2_mp.xml
- Edit this axis2_mp.xml config, find
transportSender name="http" and add a parameter "SO_TIMEOUT" (in ms) :
<parameter name="SO_TIMEOUT" locked="false">108000000</parameter>
- Edit your Message Processor and in Show Additional Parameters, specify the entry "Axis2 Configuration" to repository/conf/axis2/axis2_mp.xml
SO_TIMEOUT is the time to wait for the response. You can specify CONNECTION_TIMEOUT for the max time to establish the connection.
Pay attention : all callbacks will persist up to 30 minutes in the ESB !
来源:https://stackoverflow.com/questions/21234087/wso2-esb-how-to-increase-endpoint-timeout