question

Upvotes
Accepted
36 0 2 6

How the real time data we are going to get using RFA Api

How the real time data we are going to get using RFA Api.Whether it is using cal back function to get real time data

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

Hello @harik

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,


AHS

Upvotes
Accepted
25.3k 87 12 25

Hi @harik

Please work through the whole tutorials at least as far as step 7 to get a fuller understanding of how the API works.

You will note the MyClient class of the example which is derived from rfa::common::Client and has to implement the processEvent callback method.

The example code specifies the above class instance as the event handler when it calls registerClient for the Login Request and the MarketData item request.

Therefore as and when the API receives events from the server, the API will call the processEvent handled with the event payload and the processEvent will process the event.

The dispatching of these events is controlled by the example's RdmApp:run() method which is running and dispatching events in the main application thread.

The processEvent is called by the API in the API thread context - asynchronously as it receives events from the server.


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
25.3k 87 12 25

Hi @harik

RFA event model uses event handlers/callbacks to process events received from the server

See RFA C++ Tutorials for more details. If you are using RFA Java or RFA .Net you can access similar tutorials by clicking the Available Editions: Java, .NET links.

IF you are writing a new application and using C++ or Java then I strongly recommend you use the Elektron Message API of the ElektronSDK -which is our strategic offering and much easier to learn and implement. RFA is now feature-complete / in maintenance mode.

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
36 0 2 6

@Umar Nala I gone through the rfa examples and examples shows direct api calling instead of call back functions.Shall we have some call back examples


Probably a call will help us

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.

Please advise which language you are using and which examples you are referring to?

Upvotes
36 0 2 6

RFA C++ and step 4 in download examples .I also checked examples in setup .There are also straight forward call instead of call back

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
7.6k 15 6 9

@harik

Apart from a suggestion from Umer. I would suggest you find the details about the Event Distribution Model from RFA Developer Guide(RFA_DevelopersGuide.pdf) which provided in RFA C++ packages(under folder <RFA Install Folder>/Docs).

Section 6.4.1 Event Distribution Model and 10.1.1.3 Process Event in Client has the information about the processEvent callback.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.