Feature/add middleware

The newer Kafka client is causing test to fail in Mon-API so reverted back to the older client. 
Seeing the servlet-api makes me think this PR might just be more appropriate for mon-api. Will the middleware ever be used by anything other than API? For monasca, I doubt it would be.