question

Upvotes
Accepted
85 9 11 18

How can I save raw events of real time feeds?

what is the best way to save RespMsg(from RFA C++ API) raw events to memory / disk and decode later when needed? The idea is to do as little as possible with the feeds and parse/decode(like a replay) them when needed. Thanks

elektronrfa-apic++replay-tool
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
45.2k 103 43 60

@jzhao

Please refer to the answer in this How to encode / decode? Create RespMsg objects from Buffer? question.

rfa::message::RespMsg provides the getEncodedBuffer and setEncodedBuffer methods to get and set the encoded buffer associated with a response message, respectively.

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
11.7k 57 39 60

Hi @jzhao

In general, you will have to make a copy of the data within your onRefresh callback as data within this callback is short-lived. Refer to the answer here. While that specific answer is related to the Java API, the same concepts are applied to C++.

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.

Thanks Nick. The answer you referred to above mentioned to copy data to local FieldEntry (B). The question is if the copy of such like FieldEntryList is parse-able using the same decode logic? even though it means that I need to build a static (local) clone of the one from callback.