question

Upvotes
Accepted
1 0 0 0

Can we make EMA follow an event based architecture?

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?


#technologyema-api#product
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.

Hi @vikneshh ,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

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

Otherwise please post again offering further insight into your question.

Thank you,

AHS

@vikneshh

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@vikneshh

Thank you for reaching out to us.

I think EMA is a dispatching model. It requires a thread to dispatch events and run the code in the callback methods. This thread could be an application thread (USER_DISPATCH), or an API thread (API_DISPATCH).



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.