[engine] Properly hand over URI for resources, and pass message adapter to scheduler so that it can be used in RemoteExecutor.