title: Spring data redis - multiple schema - change schema in session (getting the connection) VS. using multiple connection pools
body: <p>I find myself having to deal with more schema of a given Redis instance in the same application, using spring data redis 1.1.0.RELEASE and jedis client version 2.1.0.</p>
  
  <p>At runtime, I have to use the right schema for querying the database, accordingly to a given rule (this is "given" and I cannot change it), which changes from time to time.</p>
  
  <p>I'm wondering which of the following is the right approach:</p>
  
  <ol>
  <li>in the session (redisTemplate.execute), try to retrieve the session's connection and change the DB index (the SELECT redis command, just for clarifying) just before beginning insertions;</li>
  <li>keep multiple connection pools, one for each schema, then use the right pool instead of choosing the schema.</li>
  </ol>
  
  <p>At a guess I feel the second as "the right way", but I would avoid to overload the application with too much pools. Which should I use? Have you got other insights?</p>