1 Reply Latest reply on Oct 6, 2016 1:12 PM by ttielebein RSS
    jasong Creator

    dispatchEvent() vs dispatchBackgroundEvent()

    I can't seem to find the difference between these two calls on Things (Java based extension package) in docs.

     

    I ask because Event processing issues have been an issue with one of our customers servers and I want to make sure I understand the implications of both calls and how they relate to the event queue.

     

    Thanks!

      • Re: dispatchEvent() vs dispatchBackgroundEvent()
        ttielebein Collaborator

        Hello, these methods apply to the dispatching of local, non-property events. dispatchEvent() is synchronous, meaning the calling method will wait until the event completes to proceed with the rest of the code, and dispatchBackgroundEvent() is asynchronous, meaning that the calling method will continue on while the event processes. Local property events are always handled synchronously to reduce the chances of causing deadlocks in the database.

         

        I hope this helps!

        Tori