One of the most important findings in string theory is that of the existence of D-branes, nonperturbative objects of various dimensions in which realistic gauge dynamics can be localized. They are thus an invaluable tool when trying to embed realistic model building scenarios in string theory, since in particular they allow for the construction of localized realistic four dimensional gauge theories. In this work it is shown how D-branes allow one to engineer sectors in which supersymmetry is spontaneously broken in a metastable vacuum, the breaking of supersymmetry being transmitted by gauge mediation to a visible sector a realization in string theory of the popular GMSB mechanism in particle physics model building. The continuity of non-perturbative effects coming from euclidean D-branes as one changes the vacuum is also analyzed, showing the importance of considering multi-instanton effects for having a global view of the moduli space. This work should be of interest to those working on model building in string theory, and more generally to anyone interested in the theoretical tools used in modern string phenomenology.