EMA consumer handling of messages with StreamState ==ommstate.ClosedRecover

What is the difference between StreamState ==ommstate.Closed and StreamState ==ommstate.ClosedRecover?

How should an EMA consumer handle a MarketPrice Refresh or MarketPrice Status message received with the state component publishing StreamState ==ommstate.ClosedRecover?

Best Answer

  • ommstate.Closed means data is not available and is not likely to become available.

    An example for Closed state is when you request invalid name. Data will not be available unless you change the name.

    ommstate.ClosedRecover means data is currently not available but can be recovered at a later time.

    By default, an EMA consumer should never received this status because TREP will attempt to recover data on EMA’s behalf.

    To received closed recover status, EMA consumer must override the default login request by using the OmmConsumerConfig.addAdminMsg().

    And If you wish to handle it, then you could just treat it as a closed status but EMA consumer can attempt to re-request at a later time using the same request message.

Answers

  • ommstate.Closed means data is not available and is not likely to become available.

    An example for Closed state is when you request invalid name. Data will not be available unless you change the name.

    ommstate.ClosedRecover means data is currently not availablebut can be recovered at a later time.

    By default, an EMA consumer should never received this status because TREP will attempt to recover data on EMA’s behalf.

    To received closed recover status, EMA consumer must override the default login request by using theOmmConsumerConfig.addAdminMsg().

    And If you wish to handle it, then you could just treat it as a closed status but EMA consumer can attempt to re-request at a later time using the same request message.

  • Thanks!

    what config in login msg will override the default behavior and allow reception of ClosedRecover into the application? Is it SingleOpen = 0?

  • Yes, it is SingleOpen. But I advise against turning SingleOpen off. It usually better to let TREP recover the data.