question

Upvotes
Accepted
37 1 1 6

EMA: What does the '0' mean for returned 'handle' during registerClient?

For the 'handle' returned by the following statement:

long handle = consumer.registerClient( EmaFactory.createReqMsg().serviceName("ELEKTRON_DD").name(itemName), appClient);

What does '0' mean by EMA design? i.e., the scenario to return '0'

unregister
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.

1 Answer

Upvotes
Accepted
20.3k 73 10 20

Hi @Frederic

According to the EMA Java documentation for OmmConsumer.registerClient():

This method is ObjectLevelSafe if OmmConsumerErrorClient is used and an error condition is encountered, then null handle is returned.

Is there a particular usage that is giving a 0 return value?


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.

no particular usage. Just curious about this and would like to know the behavior of 0 return value by design. Does 0 return value mean 'null handle'?

Hi @Frederic

the return value is meant to be a handle for your item stream - so if you get back 0 - then yes a null handle.

Click below to post an Idea Post Idea