question

Upvotes
Accepted
33 9 14 31

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 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
25.3k 89 12 25

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 512.0 KiB each and 1.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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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