Fix deadlock on frequent block messages
Ref #491 (closed)
The bug for this MR is a bit difficult to test and reproduce, but in summary what it does is changing the way the messagerbl
internal queue (a bufferized channel) is accesses, making queue messages that come on it grouped and dispatched in batches.
Also, it makes the insight detector "drain" the channel, in case there are multiple messages to read, instead of reading just one message. As the detector runs on every two seconds, if messages come more often than this frequency, the queue won't fill up anymore.
Edited by Leandro Santiago