eclipse/vert.x — pull request #827 by wangjunbo924 (2014-05-07 11:21:22+00:00)
Title: able to limit the size of requests in waiter queue and pipeline queue

add new feature to vert.x so that we are able to limit the size of requests in waiter queue and the size of requests that are pipelined in connection. Potentially JVM will be OutOfMemory if we keep making requests for a long time under a large load which exceeds the system's capacity. In this case, number of the outstanding requests held by ClientConnection and requests held by waiter queue will keep increasing until OOM.

Our longevity tests has confirmed this issue. However we believe in no case should JVM stop working. So I add configurable `connectionMaxOutstandingRequest` and `maxWaiterQueueSize` so that outstanding requests held by vert.x can be limited in certain range. If you don't want to limit it just leave them as the default value -1. Must explicitly call `setMaxWaiterQueueSize()` or `setConnectionMaxOutstandingRequest()` if you need to enable it.