Revert "Messaging policies factory"

This reverts commit ac805c3ea792d3b4eccc60580b1dc820c63c9680.
Revert "Revert "Messaging policies factory""

This reverts commit 97c4d1a31032c8d676b47dd2b7d0d14bb677c3de.
Fixed build under linux