Currently it sets a default of Integer.MAX_VALUE, and Tomcat allocates a BytBuffer of that size which can cause an OutOfMemoryError. Also expose the EndPointConfig to subclasses to make it setMaxBinaryMessageBufferSize on that level.