Added a method that allows for persisting rest messages. Still need to make config option to use persistance as optional