title: Multi Threading vs JMS Queue for Asynchronous Logging
body: <p><strong>Requirement:</strong> Log events like Page Views and form Submits. Each page has ~1 second SLA. The application can have 100's of concurrent users at a time.</p>
  
  <p>Log events are stored into the Database.</p>
  
  <p><strong>Solution:</strong> My initial thought was to use an async logging approach where the control returns back to the application and the logging happens in a different thread (via Spring's Thread pool task executor).</p>
  
  <p>However someone suggested using JMS would be a more robust approach. Is the added work(<em>Setting-up queue(s), writing to the queue(s), reading from the queue(s)</em>) required when using this approach worthwhile?</p>
  
  <p>What are some of the best practices / things to look out for (in a production environment) when implementing something like this? </p>