As we saw in the RunJob method's initialization block, once we gain access to an executor instance for the graph, we register a bspgraph.Replayer instance which serves as an escape hatch for relaying messages destined for vertices, which are managed by a different graph instance.
This is how the relayNonLocalMessage helper method is implemented:
func (c *workerJobCoordinator) relayNonLocalMessage(dst string, msg message.Message) error { serializedMsg, err := c.cfg.serializer.Serialize(msg) if err != nil { return xerrors.Errorf("unable to serialize message: %w", err) } wMsg := &proto.WorkerPayload{Payload: &proto.WorkerPayload_RelayMessage{ RelayMessage: &proto.RelayMessage{ Destination: ...