> When a system is a messaging based system

Would be better as 

> In a messaging based system