# Is it possible to force a timeout value for client-to-broker calls?

**URL:** <https://techcommunity.softwareag.com/t/is-it-possible-to-force-a-timeout-value-for-client-to-broker-calls/174688>\
**Category:** Forum\
**Tags:** Mainframe-Integration, EntireX\
**Created:** [February 25, 2014, 10:30am UTC](https://techcommunity.softwareag.com/t/is-it-possible-to-force-a-timeout-value-for-client-to-broker-calls/174688 "2014-02-25T10:30:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avi\_Grossbard](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Avi\_Grossbard](https://techcommunity.softwareag.com/u/Avi_Grossbard)\
**Post date:** [February 25, 2014, 10:30am UTC](https://techcommunity.softwareag.com/t/is-it-possible-to-force-a-timeout-value-for-client-to-broker-calls/174688/1 "2014-02-25T10:30:28Z")

</div>

I’m using a EntireX Java Client generated from IDL file. This works fine. However, there are cases where for specific input parameters of the call, the replies from the broker return after a very long time - 20 seconds.

remark: I intentionally not want to deal with the question of tuning the remote server which conveys the reply back to the broker.

Instead, What I like to know is whether there is a way for the client, setup a timeout value for the requests being sent to the broker?  
If the broker supports it, I expect to get an exception on timeout which will break the current call and return control back to the calling client.

Thanks

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 25, 2014, 10:39am UTC](https://techcommunity.softwareag.com/t/is-it-possible-to-force-a-timeout-value-for-client-to-broker-calls/174688/2 "2014-02-25T10:39:36Z")

</div>

Hello Avi,

sure, this is possible: in the client application just call the method wrapper.setDefaultWaittime(String wait), where “wrapper” is an instance of the interface object class generated by the Java Wrapper.  
See [http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-5\_sp1/EntireX/9-5-SP1\_EntireX/aci\_java/com/softwareag/entirex/aci/BrokerService.html#setDefaultWaittime(java.lang.String)](http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuites/wmsuite9-5_sp1/EntireX/9-5-SP1_EntireX/aci_java/com/softwareag/entirex/aci/BrokerService.html#setDefaultWaittime%28java.lang.String%29)

---

<div class="post-metadata">

**Author:** ![Rolf\_Bahlke](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/rolf_bahlke/32/109_2.png) [@Rolf\_Bahlke](https://techcommunity.softwareag.com/u/Rolf_Bahlke)\
**Post date:** [February 25, 2014, 10:40am UTC](https://techcommunity.softwareag.com/t/is-it-possible-to-force-a-timeout-value-for-client-to-broker-calls/174688/3 "2014-02-25T10:40:14Z")

</div>

BTW, the default timeout is 60 seconds.

---

<div class="post-metadata">

**Author:** ![Avi\_Grossbard](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Avi\_Grossbard](https://techcommunity.softwareag.com/u/Avi_Grossbard)\
**Post date:** [February 25, 2014, 10:43am UTC](https://techcommunity.softwareag.com/t/is-it-possible-to-force-a-timeout-value-for-client-to-broker-calls/174688/4 "2014-02-25T10:43:44Z")

</div>

Thank you you very much Rolf for the quick usable response.  
As usual, you are very helpfull

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 3:30pm UTC](https://techcommunity.softwareag.com/t/is-it-possible-to-force-a-timeout-value-for-client-to-broker-calls/174688/5 "2021-04-02T15:30:25Z")

</div>


