Subscribing to RIC multiple times

I have a subscription to a set of RICs (e.g. VOD.L) open which processes deltas and populates a cache

Another operation we want to support is the ability to do an AdHoc market data request for a RIC to get a snapshot in time.

If I request VOD.L for an AdHoc snapshot, while our cache service is running (processing changes to existing subscriptions (inc. VOD.L)), no event is received, but if I do an AdHoc request for a RIC we are not currently subscribing to then it will produce a result.

Is it not possible then to request for a RIC while already subscribing to it?

Best Answer

  • Lars-at-Addicticks
    Answer ✓

    Yes, I believe the RFA library will not let you do two subscriptions on the same item.

    I suppose by AdHoc you mean snapshot? What you can do is to ask for a REFRESH on the existing stream. This would give you a snapshot-within-the-stream, so to speak.

    The way to do that is to call OMMConsumer.reissueClient(...) method.

    Here's how it will work using a real-life example:

    1. Configure TRexplorer to use message tracing as described here.

    2. Open a subscription in streaming mode. In this example I use "EUR=". Streaming mode is simply the same as not ticking "Snapshot". In the Item Viewer you'll now see the data item continuously updating. You'll notice that with every update only some fields actually change.

    3. Press the "Refresh" button as indicated below.

    image

    4. Watch what happens in the Item Viewer when Refresh button is pressed: all fields are updating.

    5. Check the exchanged messages in the Output Window. You'll see a message like the one below:

    image

    Every time you press the "Refresh" button you'll get a REFRESH_RESP message. You'll notice in the message it says that the refresh was solicited, meaning you asked for it explicitly. (yes, there's also such a thing as an unsolicited refresh, typically happens after an outage has restored itself)

    The above is what it will look like in your application too.

Answers