According to Cell Press, "Royal jelly is produced in [two different] glands of worker bees, one that produces the protein in a neutral pH and one that produces fatty acids that can reduce said pH when the two secretions" come together (Cell Press).
For a honeybee, royal jelly is a crucial diet for the first couple days for all bees. And for honeybee larvae to become queen, the larvae must be fed and be surrounded by royal jelly for it to morph successfully. However, because queen larvae, "are too big to fit into the cells of the hive's honeycomb," they are able to hang upside down in the queen's cell anchored with the royal jelly (Cell Press). So, what allows this royal jelly to acquire these properties?
Turns out, royal jelly is not always thick and sticky. In a recent study, researchers proposed that the viscosity of a royal jelly were dependent the particle size of a protein found in royal jelly (known as royalactin, or MRJP1) was directly correlated to the pH level found inside. The study conveyed that there was a noticeable size difference within the MRJP1 jelly when exposed to a purifier at pH 4 and at neutral (pH 7). For instance, "Most purification protocols are standardized at pH 7, [which yielded] a strange, runny consistency [within the jelly]" whereas when maintained between pH 4 and pH 5, the viscosity of the jelly seemed gelatinous and almost adherent (Cell Press). The precise pH affects the overall viscosity of royal jelly, which is an essential component in providing the optimal environment for the queen bee to develop in her early stages. If the pH levels were outside 4~5, the royal jelly would lose its heavy, sticky properties and would not be able to hold the queen larvae.