Currently, when many messages are put in a DeliveryChannel and the component does not take the messages for any reasons, the size of the DeliveryChannel will grow until there is no more memory available.
Currently, no protection exists to avoid that.
We should introduce a mechanism for the queue to be flushed on disk: instead of using memory (after a threshold to not impact performance in normal conditions) the messages would be stored on disk.
Note that persisting to disk using things like memory mapped files is very efficient and writing to disk all the time could be acceptable actually.
Special attention should be given to the handling of special situations such as JVM crashing and restoring of state after restart.