title: Join on foreign key in Kafka stream
body: <p>Lets say that I have three Kafka topics filled with events representing business events occuring in different aggregates (event sourcing application). These events allow to build aggregates with following attributes :</p>
  
  <ul>
  <li>users : usedId, name</li>
  <li>modules of an application : moduleId, name</li>
  <li>grants of users for modules of application : grantId, userId, moduleId, scope</li>
  </ul>
  
  <p>Now I want to create a stream of all grants with name of users and products (instead of id).
  I thought to do so :</p>
  
  <ol>
  <li>create a KTable for users by grouping events by userId. The KTable has userId as key. It is ok.</li>
  <li>create a KTable for products by grouping events by productId. The KTable has productId as key. It is ok.</li>
  <li>create a stream from the stream of Grants and joining on the two KTable.
  It is no ok. The problem is that joins seem only possible on primary keys. But the key of the stream is an technical identifier of the Grant and keys of users and products tables are not (they are agnostic of Grant).</li>
  </ol>
  
  <p>So how to proceed ?</p>