title: Producer Consumer pattern - handling producer failure
body: <p>I have a producer/consumer pattern like the following</p>
  
  <ul>
  <li>A fixed number of producer threads, each writing on to their own BlockingQueue, invoked via an Executor</li>
  <li>A single consumer thread, reading off the producer threads</li>
  </ul>
  
  <p>Each producer is running a database query and writing the results to its Queue. The consumer polls all the producer Queues. At the moment if there is a database error the producer thread dies and then the consumer gets stuck forever waiting for more results on the product Queue.</p>
  
  <p>How should I be structuring this to handle catch errors correctly?</p>