How can I Avoid making database call in onUpdateMsg but need result to be stored in database.Can I

To solve slow consumer problem, How can I Avoid making database call in onUpdateMsg but need result to be stored in database.Can I have an example?

Best Answer

  • nick.zincone
    Answer ✓

    Hi @MayassK,

    You will have to create an additional thread to process the updates separately. This will minimize the time spent within the onUpdateMsg(). Before processing the specific update, you will have to clone the incoming update using 'createUpdateMsg(UpdateMsg update).

    Database updates are outside the scope of EMA. However, there may be some thread creation/processing examples out on the internet. Such as here or here.