it seems the default timeout for EMA Java is 45000 milliseconds, is it possible to change that programmatically?
I did not find anything in OmmConsumerConfig about that.
I am not using EmaConfig.xml and i am creating my OmmConsumer like that:
OmmConsumerConfig config = EmaFactory.createOmmConsumerConfig(); consumer = EmaFactory.createOmmConsumer(config .host(host) .username(username) .applicationId(applicationId) );
Unfortunately, EMA Java does not support setting timeout programmatically; you have to set the timeout in EmaConfig.xml. Anyway, EMA Java is open source. Hence, you can modify EMA Java source code to be able to set timeout programmatically. EMA Java source code can be found in <EMA package>\Ema\Src\main
You do not state which timeout you refer to - so I am going to guess the Login Timeout?
If this is the case, please refer to the EMAJ_ConfigGuide.pdf that can be found in the EMA\Docs folder when you unpack the Elektron SDK.
You will note there is a parameter LoginRequestTimeOut which defaults to 45,000 milliseconds - which you can amend. There are other timeout values too such as the Dictionary Request / Directory Request - both of which also default to 45,000ms
You can change these by amending the EMAConfig.xml file.
The example of setting timeout for dictionary, directory, login, item request in EmaConfig.xml:
<Consumer> <Name value="Consumer_1"/> <Channel value="Channel_1"/> <Dictionary value="Dictionary_1"/> <!-- set dictionary, directory, login and request timeout to be 60 second--> <DictionaryRequestTimeOut value="60000"/> <DirectoryRequestTimeOut value="60000"/> <LoginRequestTimeOut value="60000"/> <RequestTimeout value="60000"/> </Consumer>