Hi guys,
Do you know if RTSDK (EMA namely) supports object (message) pooling same way or similar to RFA does?
Regards,
Vlad
@Vlad_P_1211
EMA is open source so you can verify its implementation from its source code.
EMA Java uses the EMAFactory class to creat messages.
I swiftly checked the code and found that it uses the new command to create a new message object. Therefore, EMA Java doesn't have a pool of message objects. However, EMA allows applications to implement its own message pools.
Thank you for reaching out to us.
I checked the EMA C++ configuration guide and found the MaxEventsInPool configuration.
This indicates that the API has an event's pool.
However, EMA doesn't have the the Event Distribution Mechanism (EventQueue.Dispatch) used by RFA. I think the EMA with the API dispatch mode is similar to the Callback Model in RFA.
Dear Jirapongse,
Thank you very much for a prompt response.
Yes, either library, RFA or RTSDK is supposed to provide the queue of some size for incoming events in order to provide asynchronous events processing and data integrity, no doubt. However my question was regarding message pooling. Say I want to create some message and send it then. I can create and delete it after it is sent, however in Java domain it may be a cause of significant memory utilization. That's why in RFA message is picked from the message pool but created. Pool is supported by instance of class OmmPool (com.reuters.rfa.omm.OMMPool). Message is returned to the pool after it is sent, so garbage collector won't go into play at all. So the question was if there is similar class provided in Java RTSDK API.
Thanks again for answering my question.
Thank you Sir. Best regards.