title: Multi-Tenancy in Reactive Spring boot application using mongodb-reactive
body: <p>How can we create a multi-tenant application in spring webflux using Mongodb-reactive repository? </p>
  
  <p>I cannot find any complete resources on the web for reactive applications. all the resources available are for non-reactive applications. </p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>In a non-reactive application, we used to store contextual data in ThreadLocal but this cannot be done with reactive applications as there is thread switching. There is a way to store contextual info in reactor Context inside a WebFilter, But I don't how get hold of that data in <code>ReactiveMongoDatabaseFactory</code> class. </p>
  
  <p>Thanks.</p>