MATLAB: Are some incoming messages dropped when I use FETCH command with REUTERS object in Datafeed Toolbox 4.1 (R2011a)

Datafeed Toolboxdrawnowdropfetchincomingmessagesreuters

I am using the FETCH command with my REUTERS object to receive real-time data messages from the Reuters Server. I am observing that some incoming messages are dropped.
I have a callback function that gets fired for every incoming message. Within this callback function, I do some processing and update some information to a GUI, by using the DRAWNOW command.
If I compare the real-time data displayed in MATLAB, and the real-time data viewed via a REUTERS XTRA 3000 machine, I can clearly see messages are dropped in MATLAB.

Best Answer

MATLAB handles real-time incoming data messages in a sequential order. For every incoming message that is received, a callback function is fired to act on that message.
If your callback contains the DRAWNOW command, DRAWNOW will flush the MATLAB system event queue before returning. This will result in any pending data messages in the queue being flushed.
To prevent this loss on data while updating the GUI, use the command DRAWNOW with the argument 'expose' as mentioned in the documentation for the function DRAWNOW.