question

Upvotes
Accepted
37 2 4 6

What's the equivalent of RFA's COMPLETION_EVENT in RTSDK?

To migrate RFA OMM consumer code to RTSDK/ETA API, what can be used as a COMPLETION_EVENT? We use COMPLETION_EVENT to make sure there are no events queued for subscription before destroying /deallocating objects associated with the subscription. Thank you

eta-api
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

Upvotes
Accepted
47.2k 110 44 60

@RG1

RTSDK doesn't have COMPLETION_EVENT.

You can destroy objects associated with the stream (subscription) when the stream has been closed. There are two ways to close the steams.

1. The stream has been closed by the provider. In this case, you can check the stream state of the stream by calling the rsslIsFinalState method to determine whether the RsslState represents a final state for a stream. You can destroy objects associated with the stream when the rsslIsFinalState method returns true for that stream.

2. The stream has been unsubscribed by the consumer. The consumer can unsubscribe items by sending the RsslCloseMsg. You need to specify the stream ID in the RsslCloseMsg. After sending the close message, you can destroy objects associated with that stream. However, it is also possible to retrieve update messages of that stream due to race conditions. The application must ignore the update messages of the streams that have been closed.

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.