Extract message logic into a service that can be used application wide