Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix or Usage Issue
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Transport: TCP / UDP / SSL / Multicast
-
Labels:None
-
Similar Issues:None
Description
Hello,
We're trying to use MuleClient to send a synchronous request to a tcp endpoint. We initialize mule client with a config file like this;
<connector name="tcpConnector"
className="org.mule.providers.tcp.TcpConnector">
<properties>
<property name="timeout" value="60000" />
<property name="tcpProtocolClassName"
value="org.mule.providers.tcp.protocols.LengthProtocol"
/>
</properties>
</connector>
<model name="client"/>
And the server like this;
<connector name="tcpConnector"
className="org.mule.providers.tcp.TcpConnector">
<properties>
<property name="timeout" value="60000" />
<property name="tcpProtocolClassName"
value="org.mule.providers.tcp.protocols.LengthProtocol"
/>
</properties>
</connector>
<model name="TestServer">
<mule-descriptor name="TestServiceUMO"
implementation="TestReceiver">
<inbound-router>
<endpoint synchronous="true" remoteSync="true"
remoteSyncTimeout="60000"
address="tcp://localhost:9000"
transformers="BytesToString" />
<interceptor className="default" />
</mule-descriptor>
</model>
No matter what we specify for any of the timeout values. The client allways times out after 10 seconds. I have traced through the code and it appears that the 60 second timeout specified on the connector is being set properly. However when TcpMessageDispatcher executes the following
byte[] result = receive(socket,
event.getEndpoint().getRemoteSyncTimeout());
(around Line 115)
The MuleEndpoint.getRemoteSyncTimeout() is always returning 10000.
I've also noticed that useRemoteSync() for TcpMessageDispatcher appears to always be enabled.
Can someone have a look?
Thanks for your help.
Mark
Issue Links
- relates to
-
MULE-645
MuleClient.send doesn´t respect the specified timeout
-
Hi Mark,
I can see the the problem. Have tried specifying the time out on your client call, i.e.
... client.send("tcp://localhost:1234", "data", null, 60000);
That should work.
Also, the useRemoteSync is always set to true when making 'send' calls from the client, otherwise you wouldn't get a response back from the TcpMessageDispatcher.
Cheers,
Ross