question

Upvotes
Accepted
7 3 2 3

Do we need unregister process?


This connection is dropped automatically when you finish the connection process to the Reuters?
Or Unregister processing is required?

↓↓
void thomsonreuters::ema::access::OmmConsumer::unregister ( UInt64 handle )

***************************************************************************
Reutersへの接続処理が終了したら、自動的に接続は切断されますか。
それとも、unregister処理が必ず必要ですか。

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-apiunregister
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.

Upvotes
Accepted
7.6k 15 6 9

@hiroyuki.endo

If you want to close a connection, you have to destory OmmConsumer object as described in EMA Developer Guide section 4.1.3. Destroying an OmmConsumer object causes the application to log out and disconnect from the connected server, at which time all items are closed. From our example such as Consumer100, I think destruction of the ommConsumer object occurs after the sleep.

Normally we use registerClient to open Item stream to get data for specific item and use unRegisterClient to close specific item stream by passing the item handle returned from registerClient method. It does not close the connection.

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.

@moragodkrit

@Gurpreet.

Thank you for your advice.
My question has been resolved.
By the way,do we have to destroy OmmConsumer object?
Connection process completes, after that OmmConsumer object is destroyed automatically?

@hiroyuki.endo

if your use case does not have the requirement to cut the connection on demand, you don't have to destroy it. You can leave it run until the end of application like our example.

Upvotes
21.8k 57 14 21

If the OMMConsumer is destroyed, the connection will be dropped. Are you inquiring if your application should OmmConsumer::unregister() before terminating?

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.

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.