In the bowl of a stand mixer fitted with the dough hook attachment, combine warm water, yeast, sugar, and salt. Let it stand for about 10 minutes, or until the mixture becomes foamy.
Add the chopped rosemary, flour, and very soft butter to the yeast mixture. Knead the dough on medium speed for about 12 minutes, until it is smooth and elastic.
Cover the dough with a warm, damp cloth and place it in a warm area of your kitchen. Allow it to rise for about 1 hour, or until it has doubled in size.
While the dough is rising, combine the shredded mozzarella and grated parmesan in a small bowl. Place this bowl in the freezer to keep the cheese firm until you’re ready to use it.
Preheat your oven to 425°F (220°C). Line two large baking sheets with parchment paper and set them aside.
In a large pot or Dutch oven, bring 10 cups of water and ¾ cup baking soda to a boil.
Once the dough has risen, divide it into 8 equal pieces. Roll each piece into a 16-inch rope, then flatten the rope to a width of about 4 inches.
Remove the cheese from the freezer. Place 2 tablespoons of the cheese filling evenly along the center of each rope. Roll the dough back into a rope, pinching the edges to seal the cheese inside.
Form each rope into a U shape. Cross the ends over each other and press them onto the bottom of the U shape to form a pretzel.
Carefully place each pretzel into the boiling baking soda solution, cooking for 30 seconds each. Use a slotted spoon to remove the pretzels, letting any excess water drip off before transferring them to the prepared baking sheets.
Brush the tops of each pretzel with the egg wash.
Bake in the preheated oven for 16-18 minutes, or until the pretzels are golden brown.
Allow the pretzels to cool on the baking sheets for about 5 minutes before handling.
