question

Upvotes
Accepted
5 3 2 6

Change default EMA timeout programmatically ?

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)
);
elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-apijava
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
9.5k 10 5 7

Hello @GAUTHIER.ROEBROECK

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

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
9.5k 10 5 7

Hello @GAUTHIER.ROEBROECK

You can set timeout for login, dictionary, directory and item request in EMA as shown below:


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Request timeout:

For more detail, please refer to <Elektron package>\Ema\Docs\EMAJ_ConfigGuide.pdf

thanks, but i am actually trying to set the timeout programmatically

Upvotes
20.3k 73 10 20

Hi,

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

I would like the program to fail early in case of issue, so all the timeouts related to initialization, so i suppose login and dictionnary.

Upvotes
9.5k 10 5 7

Hello @GAUTHIER.ROEBROECK

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>


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

thanks, but i am actually trying to set the timeout programmatically

Click below to post an Idea Post Idea