3 ms·
Messaging is most useful when you want to communicate between separate servers (or at least processes) and you control both sides. Within a process it is usuall
by TorKlingberg 15y ago
Messaging is most useful when you want to communicate between separate servers (or at least processes) and you control both sides. Within a process it is usually overkill. On a public interface with independent implementations you probably want a protocol that can be implemented in any language rather than be tied to a specific messaging library. Between separate parts of one system, messaging can be a convenient and efficient way to send around information. This used to be most common in large complex systems ("enterprise"), but with distributed scaling it is getting more useful for startups and hobbyists.
An alternative in the same space is remote procedure call (RPC). RPC is synchronous while messaging is asynchronous.