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処理が必ず必要ですか。

Best Answer

  • @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.

Answers

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

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