streams with interval flushing and subprocess flushing with proper retries