title: Inter-aggregate communication
body: <p>I currently have a single event stream per aggregate root and twoaggregate roots, <code>Room</code> and <code>RoomType</code>.</p>
  
  <p>The behavior of a <code>Room</code> depends on what <code>RoomType</code> it is. In order to separate both aggregates, The <code>RoomType</code> is just represented as a roomTypeId in the <code>Room</code> aggregate. A change of <code>RoomType</code> is represented by a <code>RoomTypeChanged</code> event.</p>
  
  <p>The <code>RoomTypes</code> can be managed separately and need to be in a different aggregate.</p>
  
  <p>Now consider the following use case:</p>
  
  <p>When a user invalidates a <code>RoomType</code>, all <code>Rooms</code> that have that <code>Roomtype</code> should switch to a fallback <code>RoomType</code>.</p>
  
  <p>I have thought of several approaches, but all of them seem to be problematic:</p>
  
  <ol>
  <li><p>Have an event listener listen for a <code>RoomTypeInvalidated</code>-event, and send a <code>SwitchToFallbackRoomType</code> on all <code>Room</code>-aggregates that have that <code>Roomtype</code>. 
  How would I do this though? There's no way to know which aggregates have that <code>Roomtype</code> unless I access my readmodel, which seems incorrect.
  Even if I were to load all aggregates, there's no way to load only the aggregates of that type as I can't load a subset of all streams (using geteventstore).</p></li>
  <li><p>When reapplying the <code>RoomTypeChanged</code>-events to the <code>Room</code> aggregate, instead of just applying it, do a check to see whether that <code>RoomType</code> still exists, but then again, how would I know which <code>RoomTypes</code> exist (I'd be in the same situation as 1, but inverted)? Also, it seems wrong to put in logic on reapplying events, they should just represent state changes I think.</p></li>
  </ol>
  
  <p>How would you solve this?</p>