I have a question regarding what best practice is when it comes to verifying existence of entities across bounded contexts. Is this even a valid approach in DDD? BC are supposed to be self-contained deployments essentially (i.e. you should not depend on another BC possibly being unavailable).
I have 2 BC in my project - Ingredients and Recipes. The business sells bulk ingredients but also pre-configured recipes using said ingredients. Now these are separate BC each with their own ingredient entity.
Recipe is an aggregate root that has a child entity of a list of ingredients. Does it make sense to verify that an ingredient exists in the Ingredient BC before adding it to the list of ingredients in the Recipe BC?
Ingredients can only be modified through the ingredient BC where events will be published and the recipe BC will subscribe and update its own ingredients for any changes (i.e. price/name). In order for this to be valid, the ingredient needs to be a valid one. So how do I maintain consistency between these BC? Do I inject a domain service into the recipe BC and validate ingredient existence before adding them? I am using CQRS as well so I could inject the service directly into the handler instead of a factory for creating Recipes (or would that be the right approach to using domain services?).
Sort of lost on this and if this is a valid concern.