backport realtime_collect to 1.7 for SG to use instead of calling collect, RT#5071