I think most trees produce resin like this, its just condensed sap. The maple syrup industry depends on it
This is called gummosis, and is quite common on species in the Prunus genus, but the underlying causes of gummosis can vary. Here in the U.S. I see gummosis of plum caused by at least 3 different insects, several fungal diseases, and at least 1 bacterial disease, not to mention mechanical damage....e.g. lawnmowers, etc. In other words, gummosis is the symptom, not the cause. If that tree was in my yard, my first suspicion would be lesser peachtree borer or a bark beetle.