The malodorous process of retting can be achieved in a variety of ways, but it typically involves prolonged exposure of the stalk to moisture. Plants hold themselves upright by increasing water uptake into their cells, which causes the plasma membrane to swell and increases internal pressure against the cell wall. This pressure keeps the plant structures stiff (Biology 101 review: Turgor pressure). Prolonged water exposure during retting eventually causes the cells of the phloem to lyse, or burst open, and allows local micro-organisms that break down the sticky pectins to invade the plant cell.
The image to the right is a cross section of a bast fiber: "X" is xylem; "P" is phloem; "C" is cortex; "BF" is bast fibers.
How do these micro-organisms break down those sticky pectins? A man named Sergei Winogradsky figured out the answer to this question back in the 1890s. Winogradsky, a microbiologist and soil ecologist, is actually quite famous for this answer - his discovery of chemosynthesis - a process wherein autotrophs (organisms that make their own food) absorb carbon and inorganic nutrients from their surrounding environments in order to mediate the chemical reactions with which they create their own energy.
Prior to this discovery, scientists believed that all autotrophs were dependent upon sunlight for energy production (remember photosynthesis?). But Winogradsky found a little bacterium living in the root nodules of legume plants that changed everything. He identified it as Clostridium Pasteuranium, an obligate anaerobe that, by definition, cannot survive in the presence of atmospheric oxygen (O2). The presence of this autotrophic bacterium inside of the root nodules, without access to atmospheric oxygen and therefore also without access to sunlight, led Winogradsky to investigate how it managed to survive.
He found that C. Pasteuranium uses water molecules to break up the sticky pectin bonds that hold the bast fibers to the phloem, a process called hydrolysis. It then uses the chemical pieces of the broken up pectins to create ammonia (NH3) out of free, bioavailable nitrogen (N2) in its surrounding environment, which can then be utilized by the bacteria in its metabolic processes. This is is called nitrogen fixation. You’ve learned about it before this biology lesson (the nitrogen cycle), and you’ve seen it with your own eyes (lightning).
Scientists have since isolated more than 22 different kinds of autotrophic, pectin-dissolving bacteria from retted flax, mostly belonging to the Clostridium family.