The Messenger
interface with its implementation are
used to define the way to communicate between Multiversx nodes.
There are 2 ways to send data to the other peers:
- Broadcasting messages on a
pubsub
using topics; - Direct sending messages to the connected peers.
The first type is used to send messages that has to reach every node (from corresponding shard, metachain, consensus group, etc.) and the second type is used to resolve requests coming from directly connected peers.