As Mark pointed out, the handling of such a large file would be ideally implemented using Spring Batch.
However, it is worth noting that since M4 we support creating messages with a java.io.File payload, so that once such a big file is dropped in the corresponding directory, a message containing a reference to a file is created and passed to a channel.
Thus, your process can react to the change, but not necessarily pass around 5GB of content. Once your Message<File> entity has reached a proper endpoint, the handler can further do a batch processing itself.
--Marius
Marius Bogoevici,
Spring Integration Committer