If you use white poppy, dry roast them in a skillet to activate the flavors. If you use black poppy seeds, you don't need to do that because black poppy are already instense.
Grind poppy seeds in a regular blender with a small jar or in a spice or coffee grinder.
Add the poppy seeds to a nonstick saucepan and pour in ⅔ of the milk. Mix over a slow to medium heat setting.
Stir in the other ingredients (sugar, semolina, salt, vanilla, rum, and the remaining milk) and combine.
Continue to cook over a low heat setting and keep on stirring until the content turns into a thick paste consistency.
Allow the poppy filling to cool and use in your baking or store and user another day.
Notes
Use semolina flour if you can. If you can't get this ingredient, switch the quantity with all-purpose flour.