question

Upvotes
Accepted
1 0 0 3

How to perform many subscription to a session, synchronously?

Hello,

I am migrating my application from RFA 7.0.0 to RFA 7.6.1.

But I am facing a problem with the eventQueue : its size is getting bigger and bigger until I get OutOfMemoryException. It is strange because with RFA 7.0.0 ( and JDK5), we did not have this issue.

In the examples of RFA, I found this MDSubscribeSyncDemo example. But this one is performing a snapshot subscription, which is not what I need. Does someone has an idea How to perform many subscription to a session, synchronously?

Did anyone faced this OutOfMemory exception caused by the eventQueue?

Thanks

treprfarfa-apievent-queuesynchronisation
icon clock
10 |1500

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

Upvote
Accepted
20.3k 73 10 20

Hi @wajdi.benslimane

In terms of the example you mention, the command line parameter -itemName can take a comma separated list of RICs. The code then iterates through the list and requests each item synchronously.

The subscribeSync method is a blocking method which will not return until an image or close status event is received and is only intended for snapshot subscriptions.

If you want to make streaming subscriptions then you can use the asynchronous technique as demonstrated in the similar MDSubDemo example.

However, please note that the MarketData interface is legacy and if you are planning to rewrite applications then you should use the newer OMM based interfaces and even consider rewriting your code using the Java Elektron Message API (EMA) which is part of the Elektron SDK. EMA is an ease of use layer which is typically much easier to learn, develop and maintain - and will also continue to benefit from enhancements in the future.

With regards your OutOfMemory issue I recommend you open a ticket with our support team who can help perform any required in depth diagnostic.

icon clock
10 |1500

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

Upvotes
1 0 0 3

Hi @Umer Nalla

Thank you for your answer.

For now, we are not planning to rewrite the application. We are migrating from FRA 7.0.0 to RFA 7.6.1 and we suppose that this will be enough to connect to new TREP3 servers.

Do you think it is enough?

icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

Hi @wajdi.benslimane

As long your TREP 3.0 servers are configured to support legacy data formats, then this should suffice. Your Market Data team should be able to confirm.

icon clock
10 |1500

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

Upvotes
13k 32 12 18

@wajdi.benslimane in addition to excellent suggestions provided above, the underlying reason for out of memory, is most likely that your consumer is not processing the new events fast enough. Try to optimize the event dispatch loop (processEvent).

icon clock
10 |1500

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

Click below to post an Idea Post Idea