improve the patch for message routing with a configuration

Resolves-bug: https://github.com/sebhtml/ray/issues/170
Signed-off-by: Sébastien Boisvert <sebastien.boisvert.3@ulaval.ca>