I am currently using EMA Java to subscribe to several ric codes. From what I have explored, we can only use a API_DISPATCH OperationModel which requires the main application thread to sleep for some time to let the EMA thread run in the background and dispatch market data events. The other OperationModel USER_DISPATCH requires us to run a while loop indefinitely and wait and manually dispatch market data events on every iteration. This results in a dedicated thread to just be waiting for events before dispatching them.
Is there any way where EMA callback methods can receive messages just based on incoming events without the application thread having to sleep or dispatch on every iteration?