How to set timeout when call SAP RFC

it is no use to set timeout in flow service,and I find in extend setting does not work, either.How can I control this manually?

I try to use publishAndWait service to publish a document .The service that subscribes the document calls RFC.In publishAndWait service I set timeout.I am not sure of the solution.Does anybody experiences the case.

We need to call RFC and wait its return message, due to performance, we have to set timeout as 30 mins. If no return from RFC for 30 minutes, caller has to log error and throw an exception.